Date: Sun, 30 Jun 2013 13:17:37 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252415 - head/sys/kern Message-ID: <201306301317.r5UDHbje094479@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Sun Jun 30 13:17:37 2013 New Revision: 252415 URL: http://svnweb.freebsd.org/changeset/base/252415 Log: acct: reduce code duplication by using acct_disable as cleanup for failed kproc_create MFC after: 1 week Modified: head/sys/kern/kern_acct.c Modified: head/sys/kern/kern_acct.c ============================================================================== --- head/sys/kern/kern_acct.c Sun Jun 30 13:14:46 2013 (r252414) +++ head/sys/kern/kern_acct.c Sun Jun 30 13:17:37 2013 (r252415) @@ -284,12 +284,7 @@ sys_acct(struct thread *td, struct acct_ error = kproc_create(acct_thread, NULL, NULL, 0, 0, "accounting"); if (error) { - (void) vn_close(acct_vp, acct_flags, acct_cred, td); - crfree(acct_cred); - acct_configured = 0; - acct_vp = NULL; - acct_cred = NULL; - acct_flags = 0; + (void) acct_disable(td, 0); sx_xunlock(&acct_sx); log(LOG_NOTICE, "Unable to start accounting thread\n"); return (error);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306301317.r5UDHbje094479>