mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
1 changed files with 5 additions and 7 deletions
|
|
@ -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 a new issue