Deobfuscate cleanup path in clnt_vc_create(..)

Similar to r300836, r301800, and r302550, cl and ct will always
be non-NULL as they're allocated using the mem_alloc routines,
which always use `malloc(..., M_WAITOK)`.

MFC after: 1 week
Reported by: Coverity
CID: 1007342
Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
Enji Cooper 2016-07-11 07:07:15 +00:00
parent f99529597c
commit 7d3db23544

View File

@ -270,12 +270,10 @@ clnt_vc_create(
return (cl);
err:
if (ct) {
mtx_destroy(&ct->ct_lock);
mem_free(ct, sizeof (struct ct_data));
}
if (cl)
mem_free(cl, sizeof (CLIENT));
mtx_destroy(&ct->ct_lock);
mem_free(ct, sizeof (struct ct_data));
mem_free(cl, sizeof (CLIENT));
return ((CLIENT *)NULL);
}