Author: ngie
Date: Mon Jul 11 07:07:15 2016
New Revision: 302551
URL: https://svnweb.freebsd.org/changeset/base/302551

Log:
  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

Modified:
  head/sys/rpc/clnt_vc.c

Modified: head/sys/rpc/clnt_vc.c
==============================================================================
--- head/sys/rpc/clnt_vc.c      Mon Jul 11 06:58:24 2016        (r302550)
+++ head/sys/rpc/clnt_vc.c      Mon Jul 11 07:07:15 2016        (r302551)
@@ -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);
 }
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to