mirror of
https://github.com/bgp/bgpq4
synced 2025-02-28 08:53:11 +00:00
avoid null deref in sx_radix_node_freeall
Fixes segfault if querying an AS with no route objects (e.g 65000).
This commit is contained in:
@@ -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