aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqfs')
-rw-r--r--lib/sqfs/read_tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqfs/read_tree.c b/lib/sqfs/read_tree.c
index 4672a4e..b5ec3fc 100644
--- a/lib/sqfs/read_tree.c
+++ b/lib/sqfs/read_tree.c
@@ -137,7 +137,7 @@ static int fill_dir(sqfs_dir_reader_t *dr, sqfs_tree_node_t *root,
(flags & SQFS_TREE_NO_EMPTY)) {
free(n->inode);
if (prev == NULL) {
- root->children = n->next;
+ root->children = root->children->next;
free(n);
n = root->children;
} else {