summaryrefslogtreecommitdiff
path: root/ext2fs/dir.c
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2013-11-15 12:10:05 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2013-11-15 12:10:05 +0100
commit5d3b00abe9a506ab3c3310cfb82394534463c40b (patch)
tree250d9cdc11ed70d5cec2190fbfe61634c0c432fb /ext2fs/dir.c
parent95e50540529d5a411880acbb6ee9f743226243a8 (diff)
ext2fs: fix error handling
Found using the Clang Static Analyzer. * ext2fs/dir.c (diskfs_lookup_hard): Fix error handling.
Diffstat (limited to 'ext2fs/dir.c')
-rw-r--r--ext2fs/dir.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext2fs/dir.c b/ext2fs/dir.c
index c0752466..a7eeaaa4 100644
--- a/ext2fs/dir.c
+++ b/ext2fs/dir.c
@@ -195,6 +195,8 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type,
err = vm_map (mach_task_self (),
&buf, buflen, 0, 1, memobj, 0, 0, prot, prot, 0);
mach_port_deallocate (mach_task_self (), memobj);
+ if (err)
+ return err;
inum = 0;