mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-07 23:28:55 +00:00
[ALSA] sound/isa/sb/sb_mixer.c double kfree
Modules: SB drivers snd_ctl_add() already does the free on error. Coverity bug #957 Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
c27e8c5918
commit
bcc54f9a56
1 changed files with 1 additions and 3 deletions
|
@ -453,10 +453,8 @@ int snd_sbmixer_add_ctl(struct snd_sb *chip, const char *name, int index, int ty
|
||||||
strlcpy(ctl->id.name, name, sizeof(ctl->id.name));
|
strlcpy(ctl->id.name, name, sizeof(ctl->id.name));
|
||||||
ctl->id.index = index;
|
ctl->id.index = index;
|
||||||
ctl->private_value = value;
|
ctl->private_value = value;
|
||||||
if ((err = snd_ctl_add(chip->card, ctl)) < 0) {
|
if ((err = snd_ctl_add(chip->card, ctl)) < 0)
|
||||||
snd_ctl_free_one(ctl);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue