mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Call pcm_chn_destroy() in pcm_killchan() so that channel mutexes are destroyed and struct pcm_channel freed.
Reviewed by: cg MFC after: 3 days
This commit is contained in:
parent
bf139e9706
commit
e33bee0756
1 changed files with 7 additions and 1 deletions
|
|
@ -522,12 +522,18 @@ pcm_killchan(device_t dev)
|
|||
{
|
||||
struct snddev_info *d = device_get_softc(dev);
|
||||
struct snddev_channel *sce;
|
||||
struct pcm_channel *ch;
|
||||
int error = 0;
|
||||
|
||||
snd_mtxlock(d->lock);
|
||||
sce = SLIST_FIRST(&d->channels);
|
||||
snd_mtxunlock(d->lock);
|
||||
ch = sce->channel;
|
||||
|
||||
return pcm_chn_remove(d, sce->channel, 1);
|
||||
error = pcm_chn_remove(d, sce->channel, 1);
|
||||
if (error)
|
||||
return (error);
|
||||
return (pcm_chn_destroy(ch));
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
|||
Loading…
Reference in a new issue