svn commit: r301682 - stable/10/lib/libc/rpc
Garrett Cooper
ngie at FreeBSD.org
Wed Jun 8 18:27:46 UTC 2016
Author: ngie
Date: Wed Jun 8 18:27:44 2016
New Revision: 301682
URL: https://svnweb.freebsd.org/changeset/base/301682
Log:
MFC r300386:
Don't leak `handle` if svc_tp_create(..) succeeds and allocating a new
struct xlist object fails
CID: 978277
Modified:
stable/10/lib/libc/rpc/svc_generic.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/lib/libc/rpc/svc_generic.c
==============================================================================
--- stable/10/lib/libc/rpc/svc_generic.c Wed Jun 8 18:23:33 2016 (r301681)
+++ stable/10/lib/libc/rpc/svc_generic.c Wed Jun 8 18:27:44 2016 (r301682)
@@ -121,7 +121,8 @@ svc_create(dispatch, prognum, versnum, n
if (l == NULL) {
warnx("svc_create: no memory");
mutex_unlock(&xprtlist_lock);
- return (0);
+ num = 0;
+ goto done;
}
l->xprt = xprt;
l->next = xprtlist;
@@ -131,6 +132,7 @@ svc_create(dispatch, prognum, versnum, n
}
mutex_unlock(&xprtlist_lock);
}
+done:
__rpc_endconf(handle);
/*
* In case of num == 0; the error messages are generated by the
More information about the svn-src-stable
mailing list