aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sqfs/read_tree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqfs/read_tree.c b/lib/sqfs/read_tree.c
index 802446a..feda691 100644
--- a/lib/sqfs/read_tree.c
+++ b/lib/sqfs/read_tree.c
@@ -179,6 +179,9 @@ void sqfs_dir_tree_destroy(sqfs_tree_node_t *root)
{
sqfs_tree_node_t *it;
+ if (!root)
+ return;
+
while (root->children != NULL) {
it = root->children;
root->children = it->next;