radix: fix a memleak when removing the last node

pull/3534/head
Victor Julien 8 years ago
parent 3836fe2353
commit 121b3021df

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