diff --git a/dlls/ddraw/main.c b/dlls/ddraw/main.c index e654dd71938..1868ef2c100 100644 --- a/dlls/ddraw/main.c +++ b/dlls/ddraw/main.c @@ -313,7 +313,7 @@ err_out: /* Let's hope we never need this ;) */ if(wineD3DDevice) IWineD3DDevice_Release(wineD3DDevice); if(wineD3D) IWineD3D_Release(wineD3D); - if(This) HeapFree(GetProcessHeap(), 0, This); + HeapFree(GetProcessHeap(), 0, This); return hr; } diff --git a/dlls/gdi/font.c b/dlls/gdi/font.c index 16e7f7b5be0..ec9074d5b0d 100644 --- a/dlls/gdi/font.c +++ b/dlls/gdi/font.c @@ -1243,7 +1243,7 @@ BOOL WINAPI GetTextExtentExPointW( HDC hdc, LPCWSTR str, INT count, if (lpnFit) *lpnFit = nFit; - if (dxs && ! alpDx) + if (! alpDx) HeapFree(GetProcessHeap(), 0, dxs); GDI_ReleaseObj( hdc ); diff --git a/dlls/setupapi/misc.c b/dlls/setupapi/misc.c index f9b1d86c7be..c29da52274c 100644 --- a/dlls/setupapi/misc.c +++ b/dlls/setupapi/misc.c @@ -767,8 +767,7 @@ DWORD WINAPI TakeOwnershipOfFile(LPCWSTR lpFileName) fail:; dwError = GetLastError(); - if (pOwner != NULL) - MyFree(pOwner); + MyFree(pOwner); if (hToken != NULL) CloseHandle(hToken); diff --git a/dlls/setupapi/stringtable.c b/dlls/setupapi/stringtable.c index 35d6f402002..8fb196467d4 100644 --- a/dlls/setupapi/stringtable.c +++ b/dlls/setupapi/stringtable.c @@ -172,18 +172,12 @@ StringTableDestroy(HSTRING_TABLE hStringTable) { 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; - pStringTable->pSlots[i].dwSize = 0; - } + MyFree(pStringTable->pSlots[i].pData); + pStringTable->pSlots[i].pData = NULL; + pStringTable->pSlots[i].dwSize = 0; } MyFree(pStringTable->pSlots);