diff options
author | Renato Botelho <renato@netgate.com> | 2015-12-01 08:32:21 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-12-01 08:32:21 -0200 |
commit | 695ea8099809439ed40fe35451df301d75e2b39e (patch) | |
tree | f5d371838e7b09643ac854d4c84c96d401175010 /sys/netsmb/smb_iod.c | |
parent | 2572e1a27934f3539d0356653fcac9aa6b03b80e (diff) | |
parent | ff68307fb48ebed764757b9f0ff301df2f3d8825 (diff) | |
download | FreeBSD-src-695ea8099809439ed40fe35451df301d75e2b39e.zip FreeBSD-src-695ea8099809439ed40fe35451df301d75e2b39e.tar.gz |
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'sys/netsmb/smb_iod.c')
-rw-r--r-- | sys/netsmb/smb_iod.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/netsmb/smb_iod.c b/sys/netsmb/smb_iod.c index dfdd6f2..ae5c6f7 100644 --- a/sys/netsmb/smb_iod.c +++ b/sys/netsmb/smb_iod.c @@ -659,6 +659,11 @@ smb_iod_thread(void *arg) break; tsleep(&iod->iod_flags, PWAIT, "90idle", iod->iod_sleeptimo); } + + /* We can now safely destroy the mutexes and free the iod structure. */ + smb_sl_destroy(&iod->iod_rqlock); + smb_sl_destroy(&iod->iod_evlock); + free(iod, M_SMBIOD); mtx_unlock(&Giant); kproc_exit(0); } @@ -695,9 +700,6 @@ int smb_iod_destroy(struct smbiod *iod) { smb_iod_request(iod, SMBIOD_EV_SHUTDOWN | SMBIOD_EV_SYNC, NULL); - smb_sl_destroy(&iod->iod_rqlock); - smb_sl_destroy(&iod->iod_evlock); - free(iod, M_SMBIOD); return 0; } |