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);
|
return (cl);
|
||||||
|
|
||||||
err:
|
err:
|
||||||
if (cl) {
|
if (ct) {
|
||||||
if (ct) {
|
mtx_destroy(&ct->ct_lock);
|
||||||
mtx_destroy(&ct->ct_lock);
|
mem_free(ct, sizeof (struct ct_data));
|
||||||
mem_free(ct, sizeof (struct ct_data));
|
|
||||||
}
|
|
||||||
if (cl)
|
|
||||||
mem_free(cl, sizeof (CLIENT));
|
|
||||||
}
|
}
|
||||||
|
if (cl)
|
||||||
|
mem_free(cl, sizeof (CLIENT));
|
||||||
return ((CLIENT *)NULL);
|
return ((CLIENT *)NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user