janitorial: Remove two fresh redundant NULL checks before HeapFree(). Found by Smatch.

This commit is contained in:
Michael Stefaniuc 2007-09-14 22:34:15 +02:00 committed by Alexandre Julliard
parent cfd561f605
commit a5fdea0e6a
2 changed files with 2 additions and 3 deletions

View File

@ -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)
{

View File

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