Commit 3547ea01 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

shell32: Fix a potentially large memory leak in IQueryAssociations_fnGetString.

parent 16f4b563
...@@ -505,7 +505,9 @@ static HRESULT WINAPI IQueryAssociations_fnGetString( ...@@ -505,7 +505,9 @@ static HRESULT WINAPI IQueryAssociations_fnGetString(
/* Does strlenW(bufW) == 0 mean we use the filename? */ /* Does strlenW(bufW) == 0 mean we use the filename? */
len = strlenW(bufW) + 1; len = strlenW(bufW) + 1;
TRACE("found FileDescription: %s\n", debugstr_w(bufW)); TRACE("found FileDescription: %s\n", debugstr_w(bufW));
return ASSOC_ReturnData(pszOut, pcchOut, bufW, len); hr = ASSOC_ReturnData(pszOut, pcchOut, bufW, len);
HeapFree(GetProcessHeap(), 0, verinfoW);
return hr;
} }
} }
} }
...@@ -513,7 +515,9 @@ get_friendly_name_fail: ...@@ -513,7 +515,9 @@ get_friendly_name_fail:
PathRemoveExtensionW(path); PathRemoveExtensionW(path);
PathStripPathW(path); PathStripPathW(path);
TRACE("using filename: %s\n", debugstr_w(path)); TRACE("using filename: %s\n", debugstr_w(path));
return ASSOC_ReturnData(pszOut, pcchOut, path, strlenW(path) + 1); hr = ASSOC_ReturnData(pszOut, pcchOut, path, strlenW(path) + 1);
HeapFree(GetProcessHeap(), 0, verinfoW);
return hr;
} }
case ASSOCSTR_CONTENTTYPE: case ASSOCSTR_CONTENTTYPE:
......
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