mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 04:11:01 +00:00
shell32: Fix a potentially large memory leak in IQueryAssociations_fnGetString.
This commit is contained in:
parent
16f4b56345
commit
3547ea011a
|
@ -505,7 +505,9 @@ static HRESULT WINAPI IQueryAssociations_fnGetString(
|
|||
/* Does strlenW(bufW) == 0 mean we use the filename? */
|
||||
len = strlenW(bufW) + 1;
|
||||
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:
|
|||
PathRemoveExtensionW(path);
|
||||
PathStripPathW(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:
|
||||
|
|
Loading…
Reference in a new issue