aboutsummaryrefslogtreecommitdiff
path: root/fs/sandbox/sandboxfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/sandbox/sandboxfs.c')
-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 cd10fd6845f..ca802613370 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)