diff --git a/reactos/dll/win32/shell32/shelllink.c b/reactos/dll/win32/shell32/shelllink.c index 6ad7b174d38..5e05bc59a94 100644 --- a/reactos/dll/win32/shell32/shelllink.c +++ b/reactos/dll/win32/shell32/shelllink.c @@ -2184,7 +2184,10 @@ static HRESULT WINAPI IShellLinkW_fnSetPath(IShellLinkW * iface, LPCWSTR pszFile /* any other quote marks are invalid */ if (wcschr(pszFile, '"')) + { + HeapFree(GetProcessHeap(), 0, unquoted); return S_FALSE; + } HeapFree(GetProcessHeap(), 0, This->sPath); This->sPath = NULL;