summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/pcm/sndstat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/sound/pcm/sndstat.c')
-rw-r--r--sys/dev/sound/pcm/sndstat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c
index bd9cb32..bdaff2b 100644
--- a/sys/dev/sound/pcm/sndstat.c
+++ b/sys/dev/sound/pcm/sndstat.c
@@ -261,9 +261,9 @@ sndstat_unregister(device_t dev)
SLIST_FOREACH(ent, &sndstat_devlist, link) {
if (ent->dev == dev) {
SLIST_REMOVE(&sndstat_devlist, ent, sndstat_entry, link);
- free(ent, M_DEVBUF);
mtx_unlock(&sndstat_lock);
splx(s);
+ free(ent, M_DEVBUF);
return 0;
}
@@ -285,10 +285,10 @@ sndstat_unregisterfile(char *str)
SLIST_FOREACH(ent, &sndstat_devlist, link) {
if (ent->dev == NULL && ent->str == str) {
SLIST_REMOVE(&sndstat_devlist, ent, sndstat_entry, link);
- free(ent, M_DEVBUF);
sndstat_files--;
mtx_unlock(&sndstat_lock);
splx(s);
+ free(ent, M_DEVBUF);
return 0;
}
OpenPOWER on IntegriCloud