aboutsummaryrefslogtreecommitdiff
path: root/bin/gensquashfs/src/glob.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/gensquashfs/src/glob.c')
-rw-r--r--bin/gensquashfs/src/glob.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/gensquashfs/src/glob.c b/bin/gensquashfs/src/glob.c
index 7d37538..27b7baa 100644
--- a/bin/gensquashfs/src/glob.c
+++ b/bin/gensquashfs/src/glob.c
@@ -91,8 +91,8 @@ static int scan_directory(fstree_t *fs, sqfs_dir_iterator_t *dir,
if (S_ISLNK(ent->mode)) {
ret = dir->read_link(dir, &extra);
if (ret) {
- free(ent);
sqfs_perror("readlink", ent->name, ret);
+ free(ent);
return -1;
}
} else if (S_ISREG(ent->mode)) {