mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
1 changed files with 2 additions and 3 deletions
|
|
@ -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 a new issue