From d7a93b6fcd9afe8fcf2df3760d177056bf4d2c57 Mon Sep 17 00:00:00 2001 From: Anoop Saldanha Date: Fri, 22 Jun 2012 14:23:28 +0530 Subject: [PATCH] clear root node during conf de-init. also create root_backup when the root is restored back using it --- src/conf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/conf.c b/src/conf.c index 10fb9fe99d..4727c48863 100644 --- a/src/conf.c +++ b/src/conf.c @@ -543,6 +543,7 @@ void ConfRestoreContextBackup(void) { root = root_backup; + root_backup = NULL; return; } @@ -553,8 +554,10 @@ ConfRestoreContextBackup(void) void ConfDeInit(void) { - if (root != NULL) + if (root != NULL) { ConfNodeFree(root); + root = NULL; + } SCLogDebug("configuration module de-initialized"); }