]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
radix: fix a memleak when removing the last node
authorVictor Julien <victor@inliniac.net>
Fri, 26 Oct 2018 14:15:58 +0000 (16:15 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 1 Nov 2018 14:46:10 +0000 (15:46 +0100)
src/util-radix-tree.c

index 90da3c8c51cdcc72eedac26aea20b957288e6968..f81ead94d04d72d04e786746b7927f98173687d6 100644 (file)
@@ -1194,7 +1194,7 @@ static void SCRadixRemoveKey(uint8_t *key_stream, uint16_t key_bitlen,
     /* we are deleting the root of the tree.  This would be the only node left
      * in the tree */
     if (tree->head == node) {
-        SCFree(node);
+        SCRadixReleaseNode(node, tree);
         tree->head = NULL;
         SCRadixReleasePrefix(prefix, tree);
         return;