radix: fix a memleak when removing the last node

pull/3538/head
Victor Julien 6 years ago
parent 15973b01e6
commit 0f767ac20a

@ -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;

Loading…
Cancel
Save