From 0f767ac20a820e91e86aaebe62d4f26a406d774e Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 26 Oct 2018 16:15:58 +0200 Subject: [PATCH] radix: fix a memleak when removing the last node --- src/util-radix-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.2