Alexandre Julliard : ntdll: Try to use the name of the PE file also when loading .so builtin.

Alexandre Julliard julliard at winehq.org
Mon Jun 24 16:06:22 CDT 2019


Module: wine
Branch: master
Commit: 91bbc46c99dd850fad8c07e42c88ba36cc1df9ce
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=91bbc46c99dd850fad8c07e42c88ba36cc1df9ce

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Jun 24 10:30:51 2019 +0200

ntdll: Try to use the name of the PE file also when loading .so builtin.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/tests/actctx.c | 1 -
 dlls/ntdll/loader.c          | 6 ++++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c
index b7242af..9f2a401 100644
--- a/dlls/kernel32/tests/actctx.c
+++ b/dlls/kernel32/tests/actctx.c
@@ -3481,7 +3481,6 @@ static void test_builtin_sxs(void)
     GetModuleFileNameA(module_msvcp, path_msvcp, sizeof(path_msvcp));
     GetModuleFileNameA(module_msvcr, path_msvcr, sizeof(path_msvcr));
     ok(strnicmp(expected_path, path_msvcp, strlen(expected_path)) == 0, "Expected path to start with %s, got %s\n", expected_path, path_msvcp);
-    todo_wine
     ok(strnicmp(expected_path, path_msvcr, strlen(expected_path)) == 0, "Expected path to start with %s, got %s\n", expected_path, path_msvcr);
 
     DeactivateActCtx(0, cookie);
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 43ca7c5..8b42721 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -2427,7 +2427,7 @@ static NTSTATUS load_so_dll( LPCWSTR load_path, const UNICODE_STRING *nt_name,
     }
 
     info.load_path = load_path;
-    info.filename  = so_name ? NULL : nt_name;
+    info.filename  = nt_name;
     info.status    = STATUS_SUCCESS;
     info.wm        = NULL;
 
@@ -2528,7 +2528,9 @@ static NTSTATUS load_builtin_dll( LPCWSTR load_path, const UNICODE_STRING *nt_na
         return load_native_dll( load_path, nt_name, module_ptr, &image_info, flags, pwm, &st );
     }
 
-    return load_so_dll( load_path, nt_name, so_name, pwm );
+    status = load_so_dll( load_path, nt_name, so_name, pwm );
+    RtlFreeHeap( GetProcessHeap(), 0, so_name );
+    return status;
 }
 
 




More information about the wine-cvs mailing list