Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F110744837
D6572.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D6572.diff
View Options
Index: sys/rpc/svc_vc.c
===================================================================
--- sys/rpc/svc_vc.c
+++ sys/rpc/svc_vc.c
@@ -143,7 +143,7 @@
svc_vc_create(SVCPOOL *pool, struct socket *so, size_t sendsize,
size_t recvsize)
{
- SVCXPRT *xprt = NULL;
+ SVCXPRT *xprt;
struct sockaddr* sa;
int error;
@@ -189,11 +189,11 @@
SOCKBUF_UNLOCK(&so->so_rcv);
return (xprt);
+
cleanup_svc_vc_create:
- if (xprt) {
- sx_destroy(&xprt->xp_lock);
- svc_xprt_free(xprt);
- }
+ sx_destroy(&xprt->xp_lock);
+ svc_xprt_free(xprt);
+
return (NULL);
}
@@ -203,8 +203,8 @@
SVCXPRT *
svc_vc_create_conn(SVCPOOL *pool, struct socket *so, struct sockaddr *raddr)
{
- SVCXPRT *xprt = NULL;
- struct cf_conn *cd = NULL;
+ SVCXPRT *xprt;
+ struct cf_conn *cd;
struct sockaddr* sa = NULL;
struct sockopt opt;
int one = 1;
@@ -279,12 +279,10 @@
return (xprt);
cleanup_svc_vc_create:
- if (xprt) {
- sx_destroy(&xprt->xp_lock);
- svc_xprt_free(xprt);
- }
- if (cd)
- mem_free(cd, sizeof(*cd));
+ sx_destroy(&xprt->xp_lock);
+ svc_xprt_free(xprt);
+ mem_free(cd, sizeof(*cd));
+
return (NULL);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 23, 2:04 PM (10 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16799642
Default Alt Text
D6572.diff (1 KB)
Attached To
Mode
D6572: Quell false positives in svc_vc_create and svc_vc_create_conn with cd and xprt
Attached
Detach File
Event Timeline
Log In to Comment