From 98b6f846b628e858acbae9258bac78cf54126d27 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Fri, 4 Oct 2013 20:18:24 +0200 Subject: Fix memory leak in libnetfs * libnetfs/dir-lookup.c (netfs_S_dir_lookup): Properly jump to the single exit point if fshelp_fetch_root fails. --- libnetfs/dir-lookup.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'libnetfs/dir-lookup.c') diff --git a/libnetfs/dir-lookup.c b/libnetfs/dir-lookup.c index 10ea2d0b..74351fa9 100644 --- a/libnetfs/dir-lookup.c +++ b/libnetfs/dir-lookup.c @@ -277,15 +277,13 @@ netfs_S_dir_lookup (struct protid *diruser, if (error != ENOENT) { - netfs_nrele (dnp); - netfs_nput (np); *retry_port_type = MACH_MSG_TYPE_MOVE_SEND; if (!lastcomp && !error) { strcat (retry_name, "/"); strcat (retry_name, nextname); } - return error; + goto out; } /* ENOENT means there was a hiccup, and the translator vanished -- cgit v1.2.3