From: Victor Julien Date: Fri, 26 Oct 2018 14:15:58 +0000 (+0200) Subject: radix: fix a memleak when removing the last node X-Git-Tag: suricata-4.0.6~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f767ac20a820e91e86aaebe62d4f26a406d774e;p=thirdparty%2Fsuricata.git radix: fix a memleak when removing the last node --- diff --git a/src/util-radix-tree.c b/src/util-radix-tree.c index 90da3c8c51..f81ead94d0 100644 --- a/src/util-radix-tree.c +++ b/src/util-radix-tree.c @@ -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;