[ULOGD2 PATCH 16/18] Free stacks when exiting.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch modifies ulogd2 to have it free the stacks when leaving.

Signed-off-by: Eric Leblond <eric@xxxxxx>
---
 src/ulogd.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/ulogd.c b/src/ulogd.c
index b079fd2..1a1f6af 100644
--- a/src/ulogd.c
+++ b/src/ulogd.c
@@ -994,6 +994,16 @@ static void unload_plugins()
 	}
 }
 
+static void stop_stack()
+{
+	struct ulogd_pluginstance_stack *stack, *nstack;
+
+	llist_for_each_entry_safe(stack, nstack, &ulogd_pi_stacks, stack_list) {
+		free(stack);
+	}
+}
+
+
 static void sigterm_handler(int signal)
 {
 
@@ -1003,6 +1013,8 @@ static void sigterm_handler(int signal)
 
 	stop_pluginstances();
 
+	stop_stack();
+
 	unload_plugins();
 
 	if (logfile != NULL  && logfile != stdout) {
-- 
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux