Author: brueffer
Date: Sun Jul 15 11:52:24 2012
New Revision: 238483
URL: http://svn.freebsd.org/changeset/base/238483

Log:
  Jump to the failed label instead of doing cleanup ourselves.
  
  Obtained from:        DragonFly BSD
  MFC after:    2 weeks

Modified:
  head/lib/libc/rpc/getnetpath.c

Modified: head/lib/libc/rpc/getnetpath.c
==============================================================================
--- head/lib/libc/rpc/getnetpath.c      Sun Jul 15 11:39:56 2012        
(r238482)
+++ head/lib/libc/rpc/getnetpath.c      Sun Jul 15 11:52:24 2012        
(r238483)
@@ -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;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to