svn commit: r266252 - stable/8/sys/rpc

Christian Brueffer brueffer at FreeBSD.org
Fri May 16 15:57:21 UTC 2014


Author: brueffer
Date: Fri May 16 15:57:20 2014
New Revision: 266252
URL: http://svnweb.freebsd.org/changeset/base/266252

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

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

Modified: stable/8/sys/rpc/clnt_vc.c
==============================================================================
--- stable/8/sys/rpc/clnt_vc.c	Fri May 16 15:56:34 2014	(r266251)
+++ stable/8/sys/rpc/clnt_vc.c	Fri May 16 15:57:20 2014	(r266252)
@@ -313,14 +313,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);
 }
 


More information about the svn-src-stable-8 mailing list