MSI: fix a handle leak
Mike McCormack
mike at codeweavers.com
Fri Dec 24 00:45:13 CST 2004
ChangeLog:
<aric at codeweavers.com>
* fix a handle leak
-------------- next part --------------
--- dlls/msi/action.c.old 2004-12-24 15:42:51.000000000 +0900
+++ dlls/msi/action.c 2004-12-24 15:43:13.000000000 +0900
@@ -1336,6 +1336,7 @@
if (type & 0xc0)
{
DWORD ThreadId;
+ HANDLE ThreadHandle;
thread_struct *info = HeapAlloc( GetProcessHeap(), 0, sizeof(*info) );
msiobj_addref( &package->hdr );
@@ -1343,7 +1344,8 @@
info->target = dupstrW(target);
info->source = dupstrW(tmp_file);
TRACE("Start Asynchronous execution of dll\n");
- CreateThread(NULL,0,DllThread,(LPVOID)info,0,&ThreadId);
+ ThreadHandle = CreateThread(NULL,0,DllThread,(LPVOID)info,0,&ThreadId);
+ CloseHandle(ThreadHandle);
/* FIXME: release the package if the CreateThread fails */
return ERROR_SUCCESS;
}
More information about the wine-patches
mailing list