Add some missing HeapFree's and one missing free.

This commit is contained in:
Michael Stefaniuc 2003-04-03 18:04:40 +00:00 committed by Alexandre Julliard
parent c0a5823fb0
commit 2229472d94
4 changed files with 7 additions and 1 deletions

View File

@ -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;

View File

@ -529,6 +529,7 @@ static HRESULT WINAPI DPL_ConnectEx
0, lpConn, &dwConnSize );
if( FAILED( hr ) )
{
HeapFree( GetProcessHeap(), 0, lpConn );
return hr;
}

View File

@ -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;
}

View File

@ -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;
}