svn commit: r302553 - head/sys/rpc
Garrett Cooper
ngie at FreeBSD.org
Mon Jul 11 07:24:57 UTC 2016
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);
}
More information about the svn-src-all
mailing list