Author: cwittich
Date: Fri Sep 4 11:43:48 2015
New Revision: 68988
URL:
http://svn.reactos.org/svn/reactos?rev=68988&view=rev
Log:
[SHELL32] fix a memory leak CID 1322145
Modified:
trunk/reactos/dll/win32/shell32/CQueryAssociations.cpp
Modified: trunk/reactos/dll/win32/shell32/CQueryAssociations.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CQueryAs…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CQueryAssociations.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CQueryAssociations.cpp [iso-8859-1] Fri Sep 4
11:43:48 2015
@@ -474,8 +474,14 @@
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;
}