Skip to content

Commit

Permalink
ALSA: cs46xx: Potential NULL dereference in probe
Browse files Browse the repository at this point in the history
commit 1524f4e upstream.

The "chip->dsp_spos_instance" can be NULL on some of the ealier error
paths in snd_cs46xx_create().

Reported-by: "Yavuz, Tuba" <[email protected]>
Signed-off-by: Dan Carpenter <[email protected]>
Cc: <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Dan Carpenter authored and gregkh committed Jan 13, 2019
1 parent a3c16e5 commit 89c7ba9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/pci/cs46xx/dsp_spos.c
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,9 @@ int cs46xx_dsp_proc_done (struct snd_cs46xx *chip)
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
int i;

if (!ins)
return 0;

snd_info_free_entry(ins->proc_sym_info_entry);
ins->proc_sym_info_entry = NULL;

Expand Down

0 comments on commit 89c7ba9

Please sign in to comment.