diff options
author | mjg <mjg@FreeBSD.org> | 2013-06-30 13:17:37 +0000 |
---|---|---|
committer | mjg <mjg@FreeBSD.org> | 2013-06-30 13:17:37 +0000 |
commit | 523cdd9810148c88354d9ba17fa80d4ecc6fcd75 (patch) | |
tree | 011e3fd39f0380c974c9cfcaf90440584b05214f /sys/kern/kern_acct.c | |
parent | be743fe502ab426ea147d67239fd0253f632f5b6 (diff) | |
download | FreeBSD-src-523cdd9810148c88354d9ba17fa80d4ecc6fcd75.zip FreeBSD-src-523cdd9810148c88354d9ba17fa80d4ecc6fcd75.tar.gz |
acct: reduce code duplication by using acct_disable as cleanup for
failed kproc_create
MFC after: 1 week
Diffstat (limited to 'sys/kern/kern_acct.c')
-rw-r--r-- | sys/kern/kern_acct.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c index 3362112..1e4199d 100644 --- a/sys/kern/kern_acct.c +++ b/sys/kern/kern_acct.c @@ -284,12 +284,7 @@ sys_acct(struct thread *td, struct acct_args *uap) 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); |