summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorcg <cg@FreeBSD.org>2001-06-17 20:15:29 +0000
committercg <cg@FreeBSD.org>2001-06-17 20:15:29 +0000
commit494b7c747502ef2db69bcbd72ba05d31126ba33f (patch)
treeb5e5ccf21b3feb147fdb186b91d91514920440d3 /sys/dev
parentca48033e45eb275267c4ab6d92c3609047f9cc70 (diff)
downloadFreeBSD-src-494b7c747502ef2db69bcbd72ba05d31126ba33f.zip
FreeBSD-src-494b7c747502ef2db69bcbd72ba05d31126ba33f.tar.gz
fix a potential panic in dsp_clone() if no pcm devices were detected
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/sound/pcm/dsp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c
index 4626775..4653990 100644
--- a/sys/dev/sound/pcm/dsp.c
+++ b/sys/dev/sound/pcm/dsp.c
@@ -998,6 +998,8 @@ dsp_clone(void *arg, char *name, int namelen, dev_t *dev)
if (*dev != NODEV)
return;
+ if (pcm_devclass == NULL)
+ return;
unit = -1;
devtype = SND_DEV_DSP;
OpenPOWER on IntegriCloud