summaryrefslogtreecommitdiffstats
path: root/sys/xen/evtchn
diff options
context:
space:
mode:
Diffstat (limited to 'sys/xen/evtchn')
-rw-r--r--sys/xen/evtchn/evtchn_dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/xen/evtchn/evtchn_dev.c b/sys/xen/evtchn/evtchn_dev.c
index 4253d8a..7e21d7a 100644
--- a/sys/xen/evtchn/evtchn_dev.c
+++ b/sys/xen/evtchn/evtchn_dev.c
@@ -302,11 +302,11 @@ evtchn_close(struct cdev *dev, int flag, int otyp, struct thread *td __unused)
{
int i;
- mtx_lock_spin(&lock);
if (ring != NULL) {
free(ring, M_DEVBUF);
ring = NULL;
}
+ mtx_lock_spin(&lock);
for ( i = 0; i < NR_EVENT_CHANNELS; i++ )
if ( synch_test_and_clear_bit(i, &bound_ports[0]) )
mask_evtchn(i);
OpenPOWER on IntegriCloud