Add some missing HeapFree's and one missing free.
This commit is contained in:
parent
c0a5823fb0
commit
2229472d94
|
@ -505,8 +505,10 @@ BOOL cabinet_read_entries(struct cabinet *cab)
|
|||
file->attribs = EndGetI16(buf+cffile_Attribs);
|
||||
file->filename = cabinet_read_string(cab);
|
||||
|
||||
if (!file->filename)
|
||||
if (!file->filename) {
|
||||
free(file);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!linkfile)
|
||||
cab->files = file;
|
||||
|
|
|
@ -529,6 +529,7 @@ static HRESULT WINAPI DPL_ConnectEx
|
|||
0, lpConn, &dwConnSize );
|
||||
if( FAILED( hr ) )
|
||||
{
|
||||
HeapFree( GetProcessHeap(), 0, lpConn );
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
|
|
@ -749,6 +749,7 @@ DWORD WINAPI GetConsoleTitleA(LPSTR title, DWORD size)
|
|||
WideCharToMultiByte( GetConsoleOutputCP(), 0, ptr, ret + 1, title, size, NULL, NULL);
|
||||
ret = strlen(title);
|
||||
}
|
||||
HeapFree(GetProcessHeap(), 0, ptr);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -330,6 +330,7 @@ DWORD WINAPI GetModuleBaseNameW(HANDLE hProcess, HMODULE hModule,
|
|||
lpBaseName[nSize / 2 - 1] = 0;
|
||||
}
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, ptr);
|
||||
return len;
|
||||
}
|
||||
|
||||
|
@ -400,6 +401,7 @@ DWORD WINAPI GetModuleFileNameExW(HANDLE hProcess, HMODULE hModule,
|
|||
lpFileName[nSize / 2 - 1] = 0;
|
||||
}
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, ptr);
|
||||
return len;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue