mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
[SHELL32] fix a memory leak CID 1322145
svn path=/trunk/; revision=68988
This commit is contained in:
parent
3b6684d9db
commit
05649af8f1
1 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue