From 5d06c100811722500240ff513611a3a7c09eb939 Mon Sep 17 00:00:00 2001 From: brueffer Date: Sun, 15 Jul 2012 11:52:24 +0000 Subject: Jump to the failed label instead of doing cleanup ourselves. Obtained from: DragonFly BSD MFC after: 2 weeks --- lib/libc/rpc/getnetpath.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/libc/rpc/getnetpath.c') diff --git a/lib/libc/rpc/getnetpath.c b/lib/libc/rpc/getnetpath.c index d1ea554..92eae95 100644 --- a/lib/libc/rpc/getnetpath.c +++ b/lib/libc/rpc/getnetpath.c @@ -99,9 +99,8 @@ setnetpath() return (NULL); } if ((np_sessionp->nc_handlep = setnetconfig()) == NULL) { - free(np_sessionp); syslog (LOG_ERR, "rpc: failed to open " NETCONFIG); - return (NULL); + goto failed; } np_sessionp->valid = NP_VALID; np_sessionp->ncp_list = NULL; -- cgit v1.1