diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index 134d6c5b369..4f89c4c9a94 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -1753,8 +1753,7 @@ HRESULT WINAPI SHPathPrepareForWriteW(HWND hwnd, IUnknown *modless, LPCWSTR path /* check if we can access the directory */ res = GetFileAttributesW(realpath); - if (temppath) - HeapFree(GetProcessHeap(), 0, temppath); + HeapFree(GetProcessHeap(), 0, temppath); if (res == INVALID_FILE_ATTRIBUTES) { diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index fc0ba4abd45..7bad3d7b69c 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -796,7 +796,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED checkGLcall("glBindBufferARB"); /* We don't need the system memory anymore and we can't even use it for PBOs */ - if(This->resource.allocatedMemory) HeapFree(GetProcessHeap(), 0, This->resource.allocatedMemory); + HeapFree(GetProcessHeap(), 0, This->resource.allocatedMemory); This->resource.allocatedMemory = NULL; This->Flags |= SFLAG_PBO; LEAVE_GL();