Author: brueffer
Date: Fri May 16 15:53:27 2014
New Revision: 266247
URL: http://svnweb.freebsd.org/changeset/base/266247

Log:
  MFC: r265240
  
  Properly free resources in case of error.
  
  CID:          1007032
  Found with:   Coverity Prevent(tm)

Modified:
  stable/9/sys/rpc/clnt_vc.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/rpc/clnt_vc.c
==============================================================================
--- stable/9/sys/rpc/clnt_vc.c  Fri May 16 15:53:14 2014        (r266246)
+++ stable/9/sys/rpc/clnt_vc.c  Fri May 16 15:53:27 2014        (r266247)
@@ -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);
 }
 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to