Skip to content

Commit

Permalink
fix use after free, don't update the alloc field in raxFree
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Koenig <knggk@amazon.com>
  • Loading branch information
yzhaon authored and knggk committed Jun 25, 2024
1 parent 12578aa commit aaebb31
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/rax.c
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,6 @@ void raxFreeWithCallback(rax *rax, void (*free_callback)(void *)) {
/* Free a whole radix tree. */
void raxFree(rax *rax) {
raxFreeWithCallback(rax, NULL);
rax->alloc = sizeof(rax);
}

/* ------------------------------- Iterator --------------------------------- */
Expand Down

0 comments on commit aaebb31

Please sign in to comment.