]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
clear root node during conf de-init. also create root_backup when the root is restore...
authorAnoop Saldanha <poonaatsoc@gmail.com>
Fri, 22 Jun 2012 08:53:28 +0000 (14:23 +0530)
committerVictor Julien <victor@inliniac.net>
Tue, 26 Jun 2012 07:36:10 +0000 (09:36 +0200)
src/conf.c

index 10fb9fe99d2c3602a21a65f0be66dbf8a5432aea..4727c48863e79109b5cd91f1601491abb9c1e795 100644 (file)
@@ -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");
 }