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? */
|
/* 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:
|
||||||
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:
|
||||||
|
|
Loading…
Reference in New Issue