mirror of
https://github.com/bgp/bgpq4
synced 2026-09-09 01:26:14 +00:00
Merge pull request #17 from sthen/patch-2
avoid null deref in sx_radix_node_freeall
This commit is contained in:
+3
-1
@@ -23,7 +23,9 @@ void sx_radix_node_freeall(struct sx_radix_node *n) {
|
||||
}
|
||||
|
||||
void sx_radix_tree_freeall(struct sx_radix_tree *t) {
|
||||
sx_radix_node_freeall(t->head);
|
||||
if (t->head != NULL) {
|
||||
sx_radix_node_freeall(t->head);
|
||||
}
|
||||
free(t);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user