HomeFreeBSD

sound: Prevent uninitialized variable destruction in chn_init()

Description

sound: Prevent uninitialized variable destruction in chn_init()

If dsp_unit2name() fails, we'll get to out2 with b, bs and devinfo
uninitialized, which will result in a panic.

Reported by: Pierre Pronchery <pierre@freebsdfoundation.org>
Reported by: Coverity Scan
CID: 1545029, 1545025
Pull-request: https://github.com/freebsd/freebsd-src/pull/1240
Sponsored by: The FreeBSD Foundation
MFC after: 1 day
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D45272

(cherry picked from commit 5d1a5d6f1f599a4fbea9634cbe5c77f7370e1a5d)

Details

Provenance
christosAuthored on Mon, May 20, 2:14 PM
Reviewer
markj
Differential Revision
D45272: sound: Prevent uninitialized variable destruction in chn_init()
Parents
rG8a15d5e7223d: sound: Get rid of redundant assignments in chn_init()
Branches
Unknown
Tags
Unknown