Free the Win16 dummy module and wm->deps.
diff --git a/loader/module.c b/loader/module.c index cc641ef..1585f02 100644 --- a/loader/module.c +++ b/loader/module.c
@@ -773,7 +773,7 @@ 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 @@ 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 8a54147..1acb814 100644 --- a/loader/pe_image.c +++ b/loader/pe_image.c
@@ -620,6 +620,7 @@ FreeLibrary16( hModule16 ); return NULL; } + wm->hDummyMod = hModule16; if ( builtin ) {