shell32: Fix a memory leak.
Signed-off-by: Haidong Yu <yuhaidong@uniontech.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f43c01fa82
commit
479b659463
|
@ -2158,7 +2158,10 @@ static HRESULT WINAPI IShellLinkW_fnSetPath(IShellLinkW * iface, LPCWSTR pszFile
|
||||||
if (*pszFile == '\0')
|
if (*pszFile == '\0')
|
||||||
*buffer = '\0';
|
*buffer = '\0';
|
||||||
else if (!GetFullPathNameW(pszFile, MAX_PATH, buffer, &fname))
|
else if (!GetFullPathNameW(pszFile, MAX_PATH, buffer, &fname))
|
||||||
return E_FAIL;
|
{
|
||||||
|
heap_free(unquoted);
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
else if(!PathFileExistsW(buffer) &&
|
else if(!PathFileExistsW(buffer) &&
|
||||||
!SearchPathW(NULL, pszFile, NULL, MAX_PATH, buffer, NULL))
|
!SearchPathW(NULL, pszFile, NULL, MAX_PATH, buffer, NULL))
|
||||||
hr = S_FALSE;
|
hr = S_FALSE;
|
||||||
|
|
Loading…
Reference in New Issue