Date: Fri, 16 May 2014 15:57:20 +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-8@freebsd.org Subject: svn commit: r266252 - stable/8/sys/rpc Message-ID: <201405161557.s4GFvKGh020290@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405161557.s4GFvKGh020290>