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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=265240
@ -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…
Reference in New Issue
Block a user