summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormux <mux@FreeBSD.org>2002-12-20 14:32:20 +0000
committermux <mux@FreeBSD.org>2002-12-20 14:32:20 +0000
commit516031bb16a53f60e882d65dda86706001769b7d (patch)
tree4fbd9f087557ba4fad44c6495dbb354368037616
parentc01cb9bac07fd570077dcc623de962094a107c4a (diff)
downloadFreeBSD-src-516031bb16a53f60e882d65dda86706001769b7d.zip
FreeBSD-src-516031bb16a53f60e882d65dda86706001769b7d.tar.gz
Don't forget to destroy the mutex if an error occurs
in the jail() system call. Submitted by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
-rw-r--r--sys/kern/kern_jail.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c
index 94feab2..15f4b36 100644
--- a/sys/kern/kern_jail.c
+++ b/sys/kern/kern_jail.c
@@ -103,6 +103,7 @@ badcred:
PROC_UNLOCK(p);
crfree(newcred);
bail:
+ mtx_destroy(&pr->pr_mtx);
FREE(pr, M_PRISON);
return (error);
}
OpenPOWER on IntegriCloud