Properly free resources in case of error.
CID: 1007032 Found with: Coverity Prevent(tm) MFC after: 2 weeks
This commit is contained in:
parent
076e25142a
commit
c3e2c655a5
@ -270,14 +270,12 @@ clnt_vc_create(
|
||||
return (cl);
|
||||
|
||||
err:
|
||||
if (cl) {
|
||||
if (ct) {
|
||||
mtx_destroy(&ct->ct_lock);
|
||||
mem_free(ct, sizeof (struct ct_data));
|
||||
}
|
||||
if (cl)
|
||||
mem_free(cl, sizeof (CLIENT));
|
||||
if (ct) {
|
||||
mtx_destroy(&ct->ct_lock);
|
||||
mem_free(ct, sizeof (struct ct_data));
|
||||
}
|
||||
if (cl)
|
||||
mem_free(cl, sizeof (CLIENT));
|
||||
return ((CLIENT *)NULL);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user