Haidong Yu : shell32: Fix a memory leak.
Alexandre Julliard
julliard at winehq.org
Tue Oct 26 09:40:30 CDT 2021
Module: wine
Branch: stable
Commit: ef54f3c22772ab1598d091a2747b7a12efd7cd5a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ef54f3c22772ab1598d091a2747b7a12efd7cd5a
Author: Haidong Yu <yuhaidong at uniontech.com>
Date: Mon Jun 7 17:47:33 2021 +0800
shell32: Fix a memory leak.
Signed-off-by: Haidong Yu <yuhaidong at uniontech.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 479b6594630c32b345aeb1cfd3c4c9cd8e214f95)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/shell32/shelllink.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c
index 5b044d4be1d..10b4769d970 100644
--- a/dlls/shell32/shelllink.c
+++ b/dlls/shell32/shelllink.c
@@ -2150,7 +2150,10 @@ static HRESULT WINAPI IShellLinkW_fnSetPath(IShellLinkW * iface, LPCWSTR pszFile
if (*pszFile == '\0')
*buffer = '\0';
else if (!GetFullPathNameW(pszFile, MAX_PATH, buffer, &fname))
- return E_FAIL;
+ {
+ heap_free(unquoted);
+ return E_FAIL;
+ }
else if(!PathFileExistsW(buffer) &&
!SearchPathW(NULL, pszFile, NULL, MAX_PATH, buffer, NULL))
hr = S_FALSE;
More information about the wine-cvs
mailing list