summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_descrip.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 531b67f..7628d5a 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -956,9 +956,11 @@ fdalloc(td, want, result)
fdp->fd_nfiles = nfiles;
fdexpand++;
if (oldofile != NULL) {
+ FILEDESC_UNLOCK(fdp);
mtx_lock(&Giant);
FREE(oldofile, M_FILEDESC);
mtx_unlock(&Giant);
+ FILEDESC_LOCK(fdp);
}
}
return (0);
OpenPOWER on IntegriCloud