ntdll: Fix a memory leak (Valgrind).

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49904
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sven Baars 2020-10-04 18:10:24 +02:00 committed by Alexandre Julliard
parent 2dac805244
commit 973b0e1dfc
1 changed files with 3 additions and 1 deletions

View File

@ -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" );