Missing HeapFree's + 1 LocalFree (found by smatch).
This commit is contained in:
parent
398a595377
commit
1493433e38
|
@ -121,8 +121,10 @@ HRESULT WINAPI Extract(EXTRACTdest *dest, LPCSTR what)
|
||||||
TRACE("extracting to dir: %s\n", debugstr_a(dir));
|
TRACE("extracting to dir: %s\n", debugstr_a(dir));
|
||||||
|
|
||||||
/* FIXME: what to do on failure? */
|
/* FIXME: what to do on failure? */
|
||||||
if (!process_cabinet(what, dir, FALSE, FALSE, dest))
|
if (!process_cabinet(what, dir, FALSE, FALSE, dest)) {
|
||||||
|
LocalFree(dir);
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
}
|
||||||
|
|
||||||
LocalFree(dir);
|
LocalFree(dir);
|
||||||
|
|
||||||
|
|
|
@ -2803,6 +2803,7 @@ HRGN WINAPI CreatePolyPolygonRgn(const POINT *Pts, const INT *Count,
|
||||||
tmpPtBlock = HeapAlloc( GetProcessHeap(), 0, sizeof(POINTBLOCK));
|
tmpPtBlock = HeapAlloc( GetProcessHeap(), 0, sizeof(POINTBLOCK));
|
||||||
if(!tmpPtBlock) {
|
if(!tmpPtBlock) {
|
||||||
WARN("Can't alloc tPB\n");
|
WARN("Can't alloc tPB\n");
|
||||||
|
HeapFree( GetProcessHeap(), 0, pETEs );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
curPtBlock->next = tmpPtBlock;
|
curPtBlock->next = tmpPtBlock;
|
||||||
|
@ -2855,6 +2856,7 @@ HRGN WINAPI CreatePolyPolygonRgn(const POINT *Pts, const INT *Count,
|
||||||
if(!tmpPtBlock) {
|
if(!tmpPtBlock) {
|
||||||
WARN("Can't alloc tPB\n");
|
WARN("Can't alloc tPB\n");
|
||||||
REGION_DeleteObject( hrgn, obj );
|
REGION_DeleteObject( hrgn, obj );
|
||||||
|
HeapFree( GetProcessHeap(), 0, pETEs );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
curPtBlock->next = tmpPtBlock;
|
curPtBlock->next = tmpPtBlock;
|
||||||
|
|
|
@ -1788,7 +1788,11 @@ BOOL WINAPI RSAENH_CPImportKey(HCRYPTPROV hProv, CONST BYTE *pbData, DWORD dwDat
|
||||||
|
|
||||||
dwKeyLen = pPubKey->dwBlockLen-i-1;
|
dwKeyLen = pPubKey->dwBlockLen-i-1;
|
||||||
*phKey = new_key(hProv, pBlobHeader->aiKeyAlg, dwKeyLen<<19, &pCryptKey);
|
*phKey = new_key(hProv, pBlobHeader->aiKeyAlg, dwKeyLen<<19, &pCryptKey);
|
||||||
if (*phKey == (HCRYPTKEY)INVALID_HANDLE_VALUE) return FALSE;
|
if (*phKey == (HCRYPTKEY)INVALID_HANDLE_VALUE)
|
||||||
|
{
|
||||||
|
HeapFree(GetProcessHeap(), 0, pbDecrypted);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
memcpy(pCryptKey->abKeyValue, pbDecrypted+i+1, dwKeyLen);
|
memcpy(pCryptKey->abKeyValue, pbDecrypted+i+1, dwKeyLen);
|
||||||
HeapFree(GetProcessHeap(), 0, pbDecrypted);
|
HeapFree(GetProcessHeap(), 0, pbDecrypted);
|
||||||
setup_key(pCryptKey);
|
setup_key(pCryptKey);
|
||||||
|
|
|
@ -2560,6 +2560,7 @@ INT WINAPI SHUnicodeToAnsiCP(UINT CodePage, LPCWSTR lpSrcStr, LPSTR lpDstStr,
|
||||||
{
|
{
|
||||||
SHTruncateString(mem, *lpiLen);
|
SHTruncateString(mem, *lpiLen);
|
||||||
lstrcpynA(lpDstStr, mem, *lpiLen + 1);
|
lstrcpynA(lpDstStr, mem, *lpiLen + 1);
|
||||||
|
HeapFree(GetProcessHeap(), 0, mem);
|
||||||
return *lpiLen + 1;
|
return *lpiLen + 1;
|
||||||
}
|
}
|
||||||
HeapFree(GetProcessHeap(), 0, mem);
|
HeapFree(GetProcessHeap(), 0, mem);
|
||||||
|
|
|
@ -444,6 +444,7 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
FIXME("how did we get here - state=%d\n", state);
|
FIXME("how did we get here - state=%d\n", state);
|
||||||
|
HeapFree(GetProcessHeap(), 0, lpszUrlCpy);
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -579,6 +579,7 @@ static BOOL X11DRV_PALETTE_BuildSharedMap( const PALETTEENTRY *sys_pal_template
|
||||||
COLOR_sysPal = (PALETTEENTRY*)HeapAlloc(GetProcessHeap(),0,sizeof(PALETTEENTRY)*256);
|
COLOR_sysPal = (PALETTEENTRY*)HeapAlloc(GetProcessHeap(),0,sizeof(PALETTEENTRY)*256);
|
||||||
if(COLOR_sysPal == NULL) {
|
if(COLOR_sysPal == NULL) {
|
||||||
ERR("Can not allocate system palette!\n");
|
ERR("Can not allocate system palette!\n");
|
||||||
|
HeapFree(GetProcessHeap(), 0, pixDynMapping);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -589,6 +590,7 @@ static BOOL X11DRV_PALETTE_BuildSharedMap( const PALETTEENTRY *sys_pal_template
|
||||||
X11DRV_PALETTE_XPixelToPalette = HeapAlloc( GetProcessHeap(), 0, 256 * sizeof(int) );
|
X11DRV_PALETTE_XPixelToPalette = HeapAlloc( GetProcessHeap(), 0, 256 * sizeof(int) );
|
||||||
if(X11DRV_PALETTE_XPixelToPalette == NULL) {
|
if(X11DRV_PALETTE_XPixelToPalette == NULL) {
|
||||||
ERR("Out of memory: XPixelToPalette!\n");
|
ERR("Out of memory: XPixelToPalette!\n");
|
||||||
|
HeapFree(GetProcessHeap(), 0, pixDynMapping);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
for( i = 0; i < 256; i++ )
|
for( i = 0; i < 256; i++ )
|
||||||
|
@ -602,6 +604,7 @@ static BOOL X11DRV_PALETTE_BuildSharedMap( const PALETTEENTRY *sys_pal_template
|
||||||
X11DRV_PALETTE_PaletteToXPixel = (int*)HeapAlloc(GetProcessHeap(),0,sizeof(int)*256);
|
X11DRV_PALETTE_PaletteToXPixel = (int*)HeapAlloc(GetProcessHeap(),0,sizeof(int)*256);
|
||||||
if(X11DRV_PALETTE_PaletteToXPixel == NULL) {
|
if(X11DRV_PALETTE_PaletteToXPixel == NULL) {
|
||||||
ERR("Out of memory: PaletteToXPixel!\n");
|
ERR("Out of memory: PaletteToXPixel!\n");
|
||||||
|
HeapFree(GetProcessHeap(), 0, pixDynMapping);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -894,6 +894,7 @@ BOOL X11DRV_SetWindowText( HWND hwnd, LPCWSTR text )
|
||||||
if (!(utf8_buffer = HeapAlloc( GetProcessHeap(), 0, count )))
|
if (!(utf8_buffer = HeapAlloc( GetProcessHeap(), 0, count )))
|
||||||
{
|
{
|
||||||
ERR("Not enough memory for window text in UTF-8\n");
|
ERR("Not enough memory for window text in UTF-8\n");
|
||||||
|
HeapFree( GetProcessHeap(), 0, buffer );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
WideCharToMultiByte(CP_UTF8, 0, text, strlenW(text), utf8_buffer, count, NULL, NULL);
|
WideCharToMultiByte(CP_UTF8, 0, text, strlenW(text), utf8_buffer, count, NULL, NULL);
|
||||||
|
|
Loading…
Reference in New Issue