Jump to the failed label instead of doing cleanup ourselves.

Obtained from:	DragonFly BSD
MFC after:	2 weeks
This commit is contained in:
brueffer 2012-07-15 11:52:24 +00:00
parent 9ceedcafff
commit 5d06c10081

View File

@ -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;