diff options
author | Richard Braun <rbraun@sceen.net> | 2013-09-27 20:49:45 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2013-09-28 02:43:12 +0200 |
commit | a81c0c28ea606b0d0a2ad5eeb74071c746b7cdeb (patch) | |
tree | 5a956952b557340596b65caefb849d585df7b358 /libdiskfs | |
parent | 6e517e5e6243c1014ab35d20a6b08d7fd6a52e9b (diff) |
Fix memory leak in libdiskfs
* libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Properly jump to the
single exit point if fshelp_fetch_root fails.
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/dir-lookup.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c index 15a9b0cf..86116e35 100644 --- a/libdiskfs/dir-lookup.c +++ b/libdiskfs/dir-lookup.c @@ -294,8 +294,6 @@ diskfs_S_dir_lookup (struct protid *dircred, if (error != ENOENT) { - diskfs_nrele (dnp); - diskfs_nput (np); *returned_port_poly = MACH_MSG_TYPE_MOVE_SEND; if (!lastcomp && !error) { @@ -303,7 +301,7 @@ diskfs_S_dir_lookup (struct protid *dircred, *end++ = '/'; strcpy (end, nextname); } - return error; + goto out; } /* ENOENT means there was a hiccup, and the translator |