diff options
author | ariff <ariff@FreeBSD.org> | 2006-09-29 14:08:53 +0000 |
---|---|---|
committer | ariff <ariff@FreeBSD.org> | 2006-09-29 14:08:53 +0000 |
commit | 07966d46cf7dda6b0ee886e063c0aadf8863594a (patch) | |
tree | fc3147c06c0aa47b9d7fbf052238ca8ad8b9d87d /sys | |
parent | ffe6f5ac16976c5df71ec4feb8de419772e903dd (diff) | |
download | FreeBSD-src-07966d46cf7dda6b0ee886e063c0aadf8863594a.zip FreeBSD-src-07966d46cf7dda6b0ee886e063c0aadf8863594a.tar.gz |
Fix pointer dereference before NULL pointer checking.
Noticed by: netchild
CID: 243889
Found by: Coverity Prevent (TM)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/sound/pcm/mixer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 2e3c3d5..3e31a61 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -322,11 +322,13 @@ mixer_set_recroute(struct snd_mixer *m, int route) void mix_setdevs(struct snd_mixer *m, u_int32_t v) { - struct snddev_info *d = device_get_softc(m->dev); + struct snddev_info *d; int i; if (m == NULL) return; + + d = device_get_softc(m->dev); if (d != NULL && (d->flags & SD_F_SOFTPCMVOL)) v |= SOUND_MASK_PCM; for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) { |