summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/sandbox/sandboxfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/sandbox/sandboxfs.c b/fs/sandbox/sandboxfs.c
index cd10fd6..ca80261 100644
--- a/fs/sandbox/sandboxfs.c
+++ b/fs/sandbox/sandboxfs.c
@@ -88,15 +88,16 @@ int sandbox_fs_ls(const char *dirname)
ret = os_dirent_ls(dirname, &head);
if (ret)
- return ret;
+ goto out;
for (node = head; node; node = node->next) {
printf("%s %10lu %s\n", os_dirent_get_typename(node->type),
node->size, node->name);
}
+out:
os_dirent_free(head);
- return 0;
+ return ret;
}
int sandbox_fs_exists(const char *filename)