janitorial: Removed the rest of the redundant NULL checks before HeapFree.
This commit is contained in:
parent
b40f4c0b17
commit
757ee19ca1
|
@ -313,7 +313,7 @@ err_out:
|
||||||
/* Let's hope we never need this ;) */
|
/* Let's hope we never need this ;) */
|
||||||
if(wineD3DDevice) IWineD3DDevice_Release(wineD3DDevice);
|
if(wineD3DDevice) IWineD3DDevice_Release(wineD3DDevice);
|
||||||
if(wineD3D) IWineD3D_Release(wineD3D);
|
if(wineD3D) IWineD3D_Release(wineD3D);
|
||||||
if(This) HeapFree(GetProcessHeap(), 0, This);
|
HeapFree(GetProcessHeap(), 0, This);
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1243,7 +1243,7 @@ BOOL WINAPI GetTextExtentExPointW( HDC hdc, LPCWSTR str, INT count,
|
||||||
if (lpnFit)
|
if (lpnFit)
|
||||||
*lpnFit = nFit;
|
*lpnFit = nFit;
|
||||||
|
|
||||||
if (dxs && ! alpDx)
|
if (! alpDx)
|
||||||
HeapFree(GetProcessHeap(), 0, dxs);
|
HeapFree(GetProcessHeap(), 0, dxs);
|
||||||
|
|
||||||
GDI_ReleaseObj( hdc );
|
GDI_ReleaseObj( hdc );
|
||||||
|
|
|
@ -767,8 +767,7 @@ DWORD WINAPI TakeOwnershipOfFile(LPCWSTR lpFileName)
|
||||||
fail:;
|
fail:;
|
||||||
dwError = GetLastError();
|
dwError = GetLastError();
|
||||||
|
|
||||||
if (pOwner != NULL)
|
MyFree(pOwner);
|
||||||
MyFree(pOwner);
|
|
||||||
|
|
||||||
if (hToken != NULL)
|
if (hToken != NULL)
|
||||||
CloseHandle(hToken);
|
CloseHandle(hToken);
|
||||||
|
|
|
@ -172,18 +172,12 @@ StringTableDestroy(HSTRING_TABLE hStringTable)
|
||||||
{
|
{
|
||||||
for (i = 0; i < pStringTable->dwMaxSlots; i++)
|
for (i = 0; i < pStringTable->dwMaxSlots; i++)
|
||||||
{
|
{
|
||||||
if (pStringTable->pSlots[i].pString != NULL)
|
MyFree(pStringTable->pSlots[i].pString);
|
||||||
{
|
pStringTable->pSlots[i].pString = NULL;
|
||||||
MyFree(pStringTable->pSlots[i].pString);
|
|
||||||
pStringTable->pSlots[i].pString = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pStringTable->pSlots[i].pData != NULL)
|
MyFree(pStringTable->pSlots[i].pData);
|
||||||
{
|
pStringTable->pSlots[i].pData = NULL;
|
||||||
MyFree(pStringTable->pSlots[i].pData);
|
pStringTable->pSlots[i].dwSize = 0;
|
||||||
pStringTable->pSlots[i].pData = NULL;
|
|
||||||
pStringTable->pSlots[i].dwSize = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MyFree(pStringTable->pSlots);
|
MyFree(pStringTable->pSlots);
|
||||||
|
|
Loading…
Reference in New Issue