summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrueffer <brueffer@FreeBSD.org>2012-07-15 11:52:24 +0000
committerbrueffer <brueffer@FreeBSD.org>2012-07-15 11:52:24 +0000
commit5d06c100811722500240ff513611a3a7c09eb939 (patch)
tree34695a60f8a5410f69c460e7f13b9366b0ca91ed
parent9ceedcafff12732205b7c0d0e3b5ba276aa2fe39 (diff)
downloadFreeBSD-src-5d06c100811722500240ff513611a3a7c09eb939.zip
FreeBSD-src-5d06c100811722500240ff513611a3a7c09eb939.tar.gz
Jump to the failed label instead of doing cleanup ourselves.
Obtained from: DragonFly BSD MFC after: 2 weeks
-rw-r--r--lib/libc/rpc/getnetpath.c3
1 files changed, 1 insertions, 2 deletions
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;
OpenPOWER on IntegriCloud