diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-11-20 11:46:29 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-11-21 10:29:54 +0100 |
commit | 6ba9bf05e62d651505e1487b50eee90bd6379e02 (patch) | |
tree | fbd4e895751272e0b1c4cfd550402961c2cb565e | |
parent | edd9912ffb4a44068aae2ec21f0449d3d53616a3 (diff) |
fatfs: fix error handling in diskfs_lookup_hard
Found using the Clang Static Analyzer.
* fatfs/dir.c (diskfs_lookup_hard): Fix error handling.
-rw-r--r-- | fatfs/dir.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fatfs/dir.c b/fatfs/dir.c index b2b7d7e4..60fc898c 100644 --- a/fatfs/dir.c +++ b/fatfs/dir.c @@ -231,6 +231,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; |