mirror of
https://github.com/reactos/reactos.git
synced 2025-02-20 15:35:04 +00:00
fix a memory leak
svn path=/trunk/; revision=28085
This commit is contained in:
parent
953da5af6e
commit
1ef29d0d83
2 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -97,13 +97,13 @@ INT cmd_type (LPTSTR cmd, LPTSTR param)
|
|||
NULL);
|
||||
ConErrPrintf (_T("%s - %s"), argv[i], errmsg);
|
||||
LocalFree (errmsg);
|
||||
nErrorLevel = 1;
|
||||
nErrorLevel = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
bRet = FileGetString (hFile, buff, sizeof(buff) / sizeof(TCHAR));
|
||||
bRet = FileGetString (hFile, buff, sizeof(buff) / sizeof(TCHAR));
|
||||
if(bPaging)
|
||||
{
|
||||
if(bRet)
|
||||
|
|
Loading…
Reference in a new issue