fix a memory leak

svn path=/trunk/; revision=28085
This commit is contained in:
Christoph von Wittich 2007-08-01 22:50:58 +00:00
parent 953da5af6e
commit 1ef29d0d83
2 changed files with 7 additions and 2 deletions

View file

@ -473,7 +473,12 @@ BOOL FileGetString (HANDLE hFile, LPTSTR lpBuffer, INT nBufferLength)
}
if (!dwRead && !len)
{
#ifdef _UNICODE
cmd_free(lpString);
#endif
return FALSE;
}
lpString[len++] = _T('\0');
#ifdef _UNICODE