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
This commit is contained in:
parent
462984cb6f
commit
789872f2e9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=302553
@ -142,9 +142,8 @@ svc_dg_create(SVCPOOL *pool, struct socket *so, size_t sendsize,
|
||||
return (xprt);
|
||||
freedata:
|
||||
(void) printf(svc_dg_str, __no_mem_str);
|
||||
if (xprt) {
|
||||
svc_xprt_free(xprt);
|
||||
}
|
||||
svc_xprt_free(xprt);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user