mirror of
https://github.com/reactos/reactos.git
synced 2024-09-30 22:47:28 +00:00
[SHELL32] fix a memory leak CID 1322145
svn path=/trunk/; revision=68988
This commit is contained in:
parent
3b6684d9db
commit
05649af8f1
|
@ -474,11 +474,17 @@ HRESULT STDMETHODCALLTYPE CQueryAssociations::GetData(ASSOCF cfFlags, ASSOCDATA
|
||||||
void *data;
|
void *data;
|
||||||
DWORD size;
|
DWORD size;
|
||||||
HRESULT hres = this->GetValue(this->hkeyProgID, edit_flags, &data, &size);
|
HRESULT hres = this->GetValue(this->hkeyProgID, edit_flags, &data, &size);
|
||||||
if(FAILED(hres) || !pcbOut)
|
if(FAILED(hres))
|
||||||
{
|
{
|
||||||
return hres;
|
return hres;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!pcbOut)
|
||||||
|
{
|
||||||
|
HeapFree(GetProcessHeap(), 0, data);
|
||||||
|
return hres;
|
||||||
|
}
|
||||||
|
|
||||||
hres = this->ReturnData(pvOut, pcbOut, data, size);
|
hres = this->ReturnData(pvOut, pcbOut, data, size);
|
||||||
HeapFree(GetProcessHeap(), 0, data);
|
HeapFree(GetProcessHeap(), 0, data);
|
||||||
return hres;
|
return hres;
|
||||||
|
|
Loading…
Reference in a new issue