diff --git a/lib/plugin.c b/lib/plugin.c index 4aab33115..4b3134dd7 100644 --- a/lib/plugin.c +++ b/lib/plugin.c @@ -11,6 +11,11 @@ /** Global list of all known plugins */ struct list plugins = LIST_INIT(); +__attribute__((destructor(999))) static void __dtor_plugins() +{ + list_destroy(&plugins, NULL, false); +} + int plugin_init(struct plugin *p) { assert(p->state == STATE_DESTROYED);