summaryrefslogtreecommitdiffstats
path: root/src/ulogd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ulogd.c')
-rw-r--r--src/ulogd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ulogd.c b/src/ulogd.c
index 8ea9793..6c5ff9a 100644
--- a/src/ulogd.c
+++ b/src/ulogd.c
@@ -1334,6 +1334,15 @@ static void stop_pluginstances()
(*pi->plugin->stop)(pi);
pi->private[0] = 0;
}
+
+ /* NB: plugin->stop() might access other plugin instances,
+ * so we cannot free right away.
+ */
+ }
+ }
+
+ llist_for_each_entry(stack, &ulogd_pi_stacks, stack_list) {
+ llist_for_each_entry_safe(pi, npi, &stack->list, list) {
free(pi);
}
}