Commit 56026299 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

Remove more redundant NULL checks before HeapFree (found by Smatch).

parent 4e66d479
......@@ -274,7 +274,7 @@ static HRESULT iterate_section_fields(HINF hinf, PCWSTR section, PCWSTR key,
hr = S_OK;
done:
if (buffer && buffer != static_buffer) HeapFree(GetProcessHeap(), 0, buffer);
if (buffer != static_buffer) HeapFree(GetProcessHeap(), 0, buffer);
return hr;
}
......
......@@ -787,7 +787,7 @@ static BOOL iterate_section_fields( HINF hinf, PCWSTR section, PCWSTR key,
}
ret = TRUE;
done:
if (buffer && buffer != static_buffer) HeapFree( GetProcessHeap(), 0, buffer );
if (buffer != static_buffer) HeapFree( GetProcessHeap(), 0, buffer );
return ret;
}
......
......@@ -220,10 +220,10 @@ HRESULT WINAPI AssocQueryKeyA(ASSOCF cfFlags, ASSOCKEY assockey, LPCSTR pszAssoc
hRet = AssocQueryKeyW(cfFlags, assockey, lpszAssocW, lpszExtraW, phkeyOut);
}
if (lpszAssocW && lpszAssocW != szAssocW)
if (lpszAssocW != szAssocW)
HeapFree(GetProcessHeap(), 0, lpszAssocW);
if (lpszExtraW && lpszExtraW != szExtraW)
if (lpszExtraW != szExtraW)
HeapFree(GetProcessHeap(), 0, lpszExtraW);
return hRet;
......@@ -312,14 +312,14 @@ HRESULT WINAPI AssocQueryStringA(ASSOCF cfFlags, ASSOCSTR str, LPCSTR pszAssoc,
WideCharToMultiByte(CP_ACP,0,szReturnW,-1,pszOut,dwLenOut,0,0);
*pcchOut = dwLenOut;
if (lpszReturnW && lpszReturnW != szReturnW)
if (lpszReturnW != szReturnW)
HeapFree(GetProcessHeap(), 0, lpszReturnW);
}
}
if (lpszAssocW && lpszAssocW != szAssocW)
if (lpszAssocW != szAssocW)
HeapFree(GetProcessHeap(), 0, lpszAssocW);
if (lpszExtraW && lpszExtraW != szExtraW)
if (lpszExtraW != szExtraW)
HeapFree(GetProcessHeap(), 0, lpszExtraW);
return hRet;
}
......@@ -406,7 +406,7 @@ HRESULT WINAPI AssocQueryStringByKeyA(ASSOCF cfFlags, ASSOCSTR str, HKEY hkAssoc
}
}
if (lpszExtraW && lpszExtraW != szExtraW)
if (lpszExtraW != szExtraW)
HeapFree(GetProcessHeap(), 0, lpszExtraW);
return hRet;
}
......
......@@ -4157,7 +4157,7 @@ INT X11DRV_GetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan,
info->bmiHeader.biCompression = 0;
}
if(descr.colorMap && descr.colorMap != colorPtr)
if(descr.colorMap != colorPtr)
HeapFree(GetProcessHeap(), 0, descr.colorMap);
return lines;
}
......
......@@ -81,7 +81,7 @@ LPCTSTR GetValueName(HWND hwndLV)
{
INT item;
if (g_valueName && g_valueName != LPSTR_TEXTCALLBACK)
if (g_valueName != LPSTR_TEXTCALLBACK)
HeapFree(GetProcessHeap(), 0, g_valueName);
g_valueName = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment