Commit 155a325f authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

msi: Free the handle table on PROCESS_DETACH.

parent ada5daa7
......@@ -60,6 +60,13 @@ typedef struct msi_handle_info_t
static msi_handle_info *msihandletable = NULL;
static int msihandletable_size = 0;
void msi_free_handle_table(void)
{
msi_free( msihandletable );
msihandletable = NULL;
msihandletable_size = 0;
}
MSIHANDLE alloc_msihandle( MSIOBJECTHDR *obj )
{
MSIHANDLE ret = 0;
......@@ -80,12 +87,12 @@ MSIHANDLE alloc_msihandle( MSIOBJECTHDR *obj )
newsize = 256;
p = msi_alloc_zero(newsize*sizeof(msi_handle_info));
}
else
{
else
{
newsize = msihandletable_size * 2;
p = msi_realloc_zero(msihandletable,
newsize*sizeof(msi_handle_info));
}
}
if (!p)
goto out;
msihandletable = p;
......
......@@ -72,6 +72,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
break;
case DLL_PROCESS_DETACH:
msi_dialog_unregister_class();
msi_free_handle_table();
break;
}
return TRUE;
......
......@@ -306,6 +306,7 @@ extern void msiobj_addref(MSIOBJECTHDR *);
extern int msiobj_release(MSIOBJECTHDR *);
extern void msiobj_lock(MSIOBJECTHDR *);
extern void msiobj_unlock(MSIOBJECTHDR *);
extern void msi_free_handle_table(void);
extern void free_cached_tables( MSIDATABASE *db );
extern void msi_free_transforms( MSIDATABASE *db );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment