From a81c0c28ea606b0d0a2ad5eeb74071c746b7cdeb Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Fri, 27 Sep 2013 20:49:45 +0200 Subject: 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. --- libdiskfs/dir-lookup.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'libdiskfs') 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 -- cgit v1.2.3