Signed-off-by: Sven Baars sbaars@codeweavers.com --- dlls/shell32/shfldr_unixfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c index a37b1bf5881..48d5fe4ecb6 100644 --- a/dlls/shell32/shfldr_unixfs.c +++ b/dlls/shell32/shfldr_unixfs.c @@ -1251,7 +1251,10 @@ static HRESULT WINAPI ShellFolder2_GetDisplayNameOf(IShellFolder2* iface, LPWSTR pwszDosFileName = wine_get_dos_file_name(This->m_pszPath); if (!pwszDosFileName) return HRESULT_FROM_WIN32(GetLastError()); lpName->u.pOleStr = SHAlloc((lstrlenW(pwszDosFileName) + 1) * sizeof(WCHAR)); - if (!lpName->u.pOleStr) return HRESULT_FROM_WIN32(GetLastError()); + if (!lpName->u.pOleStr) { + heap_free(pwszDosFileName); + return HRESULT_FROM_WIN32(GetLastError()); + } lstrcpyW(lpName->u.pOleStr, pwszDosFileName); PathRemoveBackslashW(lpName->u.pOleStr); heap_free(pwszDosFileName);
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49904 Signed-off-by: Sven Baars sbaars@codeweavers.com --- 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 f12cc518996..c2b6ea603e3 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" );