Sven Baars : ntdll: Fix a memory leak (Valgrind).
Alexandre Julliard
julliard at winehq.org
Mon Oct 5 15:54:59 CDT 2020
Module: wine
Branch: master
Commit: 973b0e1dfcfb20fe5ac2713721a4844e3e3c0671
URL: https://source.winehq.org/git/wine.git/?a=commit;h=973b0e1dfcfb20fe5ac2713721a4844e3e3c0671
Author: Sven Baars <sbaars at codeweavers.com>
Date: Sun Oct 4 18:10:24 2020 +0200
ntdll: Fix a memory leak (Valgrind).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49904
Signed-off-by: Sven Baars <sbaars at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/unix/loader.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index f12cc51899..c2b6ea603e 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -920,7 +920,9 @@ static void load_libwine(void)
if (build_dir) path = build_path( build_dir, "libs/wine/" LIBWINE );
else path = build_path( dll_dir, "../" LIBWINE );
- if (!(handle = dlopen( path, RTLD_NOW )) && !(handle = dlopen( LIBWINE, RTLD_NOW ))) return;
+ handle = dlopen( path, RTLD_NOW );
+ free( path );
+ if (!handle && !(handle = dlopen( LIBWINE, RTLD_NOW ))) return;
p_wine_dll_set_callback = dlsym( handle, "wine_dll_set_callback" );
p___wine_main_argc = dlsym( handle, "__wine_main_argc" );
More information about the wine-cvs
mailing list