From: Anoop Saldanha Date: Fri, 22 Jun 2012 08:53:28 +0000 (+0530) Subject: clear root node during conf de-init. also create root_backup when the root is restore... X-Git-Tag: suricata-1.3rc1~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7a93b6fcd9afe8fcf2df3760d177056bf4d2c57;p=thirdparty%2Fsuricata.git clear root node during conf de-init. also create root_backup when the root is restored back using it --- 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"); }