mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Don't call destroy_dev it a channel has children.
vchan creation doesn't lead to /dev entry creation if the new vchan is the first child of a channel, This fix a panic that happens when loading a sound driver module, creating vchans and unloading the driver. Approved by: cg MFC after: 3 days
This commit is contained in:
parent
b24431ad30
commit
e550089d43
1 changed files with 1 additions and 1 deletions
|
|
@ -536,7 +536,7 @@ pcm_killchan(device_t dev)
|
|||
snd_mtxunlock(d->lock);
|
||||
ch = sce->channel;
|
||||
|
||||
error = pcm_chn_remove(d, sce->channel, 1);
|
||||
error = pcm_chn_remove(d, sce->channel, SLIST_EMPTY(&ch->children));
|
||||
if (error)
|
||||
return (error);
|
||||
return (pcm_chn_destroy(ch));
|
||||
|
|
|
|||
Loading…
Reference in a new issue