Don't leak handle
if svc_tp_create(..) succeeds and allocating a new
struct xlist object fails MFC after: 1 week Reported by: Coverity CID: 978277 Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
9c11e6b093
commit
3552a02626
@ -122,7 +122,8 @@ svc_create(void (*dispatch)(struct svc_req *, SVCXPRT *),
|
||||
if (l == NULL) {
|
||||
warnx("svc_create: no memory");
|
||||
mutex_unlock(&xprtlist_lock);
|
||||
return (0);
|
||||
num = 0;
|
||||
goto done;
|
||||
}
|
||||
l->xprt = xprt;
|
||||
l->next = xprtlist;
|
||||
@ -132,6 +133,7 @@ svc_create(void (*dispatch)(struct svc_req *, SVCXPRT *),
|
||||
}
|
||||
mutex_unlock(&xprtlist_lock);
|
||||
}
|
||||
done:
|
||||
__rpc_endconf(handle);
|
||||
/*
|
||||
* In case of num == 0; the error messages are generated by the
|
||||
|
Loading…
x
Reference in New Issue
Block a user