[SHELL32] fix a memory leak CID 1322145

svn path=/trunk/; revision=68988
This commit is contained in:
Christoph von Wittich 2015-09-04 11:43:48 +00:00
parent 3b6684d9db
commit 05649af8f1

View file

@ -474,11 +474,17 @@ HRESULT STDMETHODCALLTYPE CQueryAssociations::GetData(ASSOCF cfFlags, ASSOCDATA
void *data;
DWORD size;
HRESULT hres = this->GetValue(this->hkeyProgID, edit_flags, &data, &size);
if(FAILED(hres) || !pcbOut)
if(FAILED(hres))
{
return hres;
}
if (!pcbOut)
{
HeapFree(GetProcessHeap(), 0, data);
return hres;
}
hres = this->ReturnData(pvOut, pcbOut, data, size);
HeapFree(GetProcessHeap(), 0, data);
return hres;