From: Alex Henrie alexhenrie24@gmail.com
--- dlls/spoolss/router.c | 45 +++++++++++++------------------------------ 1 file changed, 13 insertions(+), 32 deletions(-)
diff --git a/dlls/spoolss/router.c b/dlls/spoolss/router.c index 4930a7eb18d..4d6d7c43559 100644 --- a/dlls/spoolss/router.c +++ b/dlls/spoolss/router.c @@ -19,6 +19,7 @@ */
#include <stdarg.h> +#include <stdlib.h>
#include "windef.h" #include "winbase.h" @@ -31,7 +32,6 @@ #include "spoolss.h"
#include "wine/debug.h" -#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(spoolss);
@@ -153,25 +153,6 @@ static CRITICAL_SECTION backend_cs = { &backend_cs_debug, -1, 0, 0, 0, 0 };
static WCHAR localsplW[] = L"localspl.dll";
-/****************************************************************** - * strdupW [internal] - * - * create a copy of a unicode-string - * - */ - -static LPWSTR strdupW(LPCWSTR p) -{ - LPWSTR ret; - DWORD len; - - if(!p) return NULL; - len = (lstrlenW(p) + 1) * sizeof(WCHAR); - ret = heap_alloc(len); - memcpy(ret, p, len); - return ret; -} - /****************************************************************** * backend_unload_all [internal] * @@ -183,10 +164,10 @@ void backend_unload_all(void) while (used_backends > 0) { used_backends--; FreeLibrary(backend[used_backends]->dll); - heap_free(backend[used_backends]->dllname); - heap_free(backend[used_backends]->name); - heap_free(backend[used_backends]->regroot); - heap_free(backend[used_backends]); + free(backend[used_backends]->dllname); + free(backend[used_backends]->name); + free(backend[used_backends]->regroot); + free(backend[used_backends]); backend[used_backends] = NULL; } LeaveCriticalSection(&backend_cs); @@ -217,15 +198,15 @@ static backend_t * backend_load(LPWSTR dllname, LPWSTR name, LPWSTR regroot) EnterCriticalSection(&backend_cs); id = used_backends;
- backend[id] = heap_alloc_zero(sizeof(backend_t)); + backend[id] = calloc(1, sizeof(backend_t)); if (!backend[id]) { LeaveCriticalSection(&backend_cs); return NULL; }
- backend[id]->dllname = strdupW(dllname); - backend[id]->name = strdupW(name); - backend[id]->regroot = strdupW(regroot); + backend[id]->dllname = wcsdup(dllname); + backend[id]->name = wcsdup(name); + backend[id]->regroot = wcsdup(regroot);
backend[id]->dll = LoadLibraryW(dllname); if (backend[id]->dll) { @@ -244,10 +225,10 @@ static backend_t * backend_load(LPWSTR dllname, LPWSTR name, LPWSTR regroot) } FreeLibrary(backend[id]->dll); } - heap_free(backend[id]->dllname); - heap_free(backend[id]->name); - heap_free(backend[id]->regroot); - heap_free(backend[id]); + free(backend[id]->dllname); + free(backend[id]->name); + free(backend[id]->regroot); + free(backend[id]); backend[id] = NULL; LeaveCriticalSection(&backend_cs); WARN("failed to init %s: %lu\n", debugstr_w(dllname), GetLastError());
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=126347
Your paranoid android.
=== debian11 (32 bit report) ===
d3d9: stateblock: Timeout visual: Timeout
d3dcompiler_43: asm: Timeout blob: Timeout hlsl_d3d11: Timeout hlsl_d3d9: Timeout reflection: Timeout
d3dcompiler_46: asm: Timeout blob: Timeout hlsl_d3d11: Timeout hlsl_d3d9: Timeout reflection: Timeout
d3dcompiler_47: asm: Timeout blob: Timeout hlsl_d3d11: Timeout hlsl_d3d9: Timeout reflection: Timeout
d3drm: d3drm: Timeout vector: Timeout
d3dx10_34: d3dx10: Timeout
d3dx10_35: d3dx10: Timeout
Report validation errors: d3dx10: Timeout
=== debian11 (build log) ===
WineRunWineTest.pl:error: The task timed out
This merge request was approved by Huw Davies.