Skip to content

Commit 03c3f94

Browse files
caesayclaude
andcommitted
Call gsf_shutdown in MsiCloseAllHandles to prevent DLL unload crash
After closing all handles and unreffing GLib objects, call gsf_shutdown() to properly tear down libgsf. This preempts the crash that occurs when libgsf's DllMain tries to clean up during DLL_PROCESS_DETACH after the GLib type system is partially torn down. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5733115 commit 03c3f94

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

msi-interop/handle_table.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,10 @@ handle_table_close_all(void)
299299
}
300300
g_free(to_unref);
301301

302+
// Shut down libgsf to prevent crashes during DLL unload.
303+
// Must be called after all GsfInput/GsfOutput objects are freed.
304+
gsf_shutdown();
305+
302306
return count;
303307
}
304308

0 commit comments

Comments
 (0)