Merge pull request #17 from sthen/patch-2

avoid null deref in sx_radix_node_freeall
This commit is contained in:
Job Snijders
2019-12-30 12:32:43 +00:00
committed by GitHub
+3 -1
View File
@@ -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);
}