From cabee39f3c46423ae6f4a3f53bf267c1be02728c Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Wed, 25 Oct 2000 21:22:27 +0000 Subject: [PATCH] Free the Win16 dummy module and wm->deps. --- include/module.h | 1 + loader/module.c | 4 +++- loader/pe_image.c | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/module.h b/include/module.h index 386113b1afc..c99c6c6a304 100644 --- a/include/module.h +++ b/include/module.h @@ -124,6 +124,7 @@ typedef struct _wine_modref struct _wine_modref *next; struct _wine_modref *prev; HMODULE module; + HMODULE16 hDummyMod; /* Win16 dummy module */ void *dlhandle; /* handle returned by dlopen() */ int tlsindex; /* TLS index or -1 if none */ diff --git a/loader/module.c b/loader/module.c index cc641efb5bf..1585f022ba6 100644 --- a/loader/module.c +++ b/loader/module.c @@ -773,7 +773,7 @@ HINSTANCE16 WINAPI WinExec16( LPCSTR lpCmdLine, UINT16 nCmdShow ) cmdline[0] = cmdline[1] = 0; } - TRACE("name: %s, cmdline: %.*s\n", name, cmdline[0], &cmdline[1]); + TRACE("name: '%s', cmdline: '%.*s'\n", name, cmdline[0], &cmdline[1]); if (SearchPathA( NULL, name, ".exe", sizeof(buffer), buffer, NULL )) { @@ -1500,6 +1500,8 @@ static void MODULE_FlushModrefs(void) TRACE(" unloading %s\n", wm->filename); /* VirtualFree( (LPVOID)wm->module, 0, MEM_RELEASE ); */ /* FIXME */ /* if (wm->dlhandle) dlclose( wm->dlhandle ); */ /* FIXME */ + FreeLibrary16(wm->hDummyMod); + HeapFree( GetProcessHeap(), 0, wm->deps ); HeapFree( GetProcessHeap(), 0, wm->filename ); HeapFree( GetProcessHeap(), 0, wm->short_filename ); HeapFree( GetProcessHeap(), 0, wm ); diff --git a/loader/pe_image.c b/loader/pe_image.c index 8a541470670..1acb81463c5 100644 --- a/loader/pe_image.c +++ b/loader/pe_image.c @@ -620,6 +620,7 @@ WINE_MODREF *PE_CreateModule( HMODULE hModule, LPCSTR filename, DWORD flags, FreeLibrary16( hModule16 ); return NULL; } + wm->hDummyMod = hModule16; if ( builtin ) {