Date: Mon, 11 Jul 2016 07:24:56 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302553 - head/sys/rpc Message-ID: <201607110724.u6B7OuVc066479@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Mon Jul 11 07:24:56 2016 New Revision: 302553 URL: https://svnweb.freebsd.org/changeset/base/302553 Log: Don't test for xpt not being NULL before calling svc_xprt_free(..) svc_xprt_alloc(..) will always return initialized memory as it uses mem_alloc(..) under the covers, which uses malloc(.., M_WAITOK, ..). MFC after: 1 week Reported by: Coverity CID: 1007341 Sponsored by: EMC / Isilon Storage Division Modified: head/sys/rpc/svc_dg.c Modified: head/sys/rpc/svc_dg.c ============================================================================== --- head/sys/rpc/svc_dg.c Mon Jul 11 07:17:52 2016 (r302552) +++ head/sys/rpc/svc_dg.c Mon Jul 11 07:24:56 2016 (r302553) @@ -142,9 +142,8 @@ svc_dg_create(SVCPOOL *pool, struct sock return (xprt); freedata: (void) printf(svc_dg_str, __no_mem_str); - if (xprt) { - svc_xprt_free(xprt); - } + svc_xprt_free(xprt); + return (NULL); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607110724.u6B7OuVc066479>