Date: Fri, 16 May 2014 15:53:27 +0000 (UTC) From: Christian Brueffer <brueffer@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266247 - stable/9/sys/rpc Message-ID: <201405161553.s4GFrR10019268@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405161553.s4GFrR10019268>