Date: Wed, 8 Jun 2016 18:43:11 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r301685 - stable/9/lib/libc/rpc Message-ID: <201606081843.u58IhBRG060970@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Wed Jun 8 18:43:11 2016 New Revision: 301685 URL: https://svnweb.freebsd.org/changeset/base/301685 Log: MFstable/10 r301682: MFC r300386: Don't leak `handle` if svc_tp_create(..) succeeds and allocating a new struct xlist object fails CID: 978277 Modified: stable/9/lib/libc/rpc/svc_generic.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/rpc/svc_generic.c ============================================================================== --- stable/9/lib/libc/rpc/svc_generic.c Wed Jun 8 18:41:49 2016 (r301684) +++ stable/9/lib/libc/rpc/svc_generic.c Wed Jun 8 18:43:11 2016 (r301685) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606081843.u58IhBRG060970>