diff options
author | Dave Jones <davej@redhat.com> | 2006-03-06 07:31:18 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 04:36:08 -0500 |
commit | 3de4414e798795ef5d719622dbf12bbe27a9e72e (patch) | |
tree | b7724eee842c7d33a8e322cab839da0ea3abc336 /sound | |
parent | bcc54f9a563f146e723ead16c76f842bcaeb694e (diff) |
[ALSA] ad1848 double free
Modules: AD1848 driver
Same again, snd_ctl_add() already kfree's on error.
Coverity #956
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/isa/ad1848/ad1848_lib.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/isa/ad1848/ad1848_lib.c b/sound/isa/ad1848/ad1848_lib.c index d4b0e580557e..e0f8baa843b9 100644 --- a/sound/isa/ad1848/ad1848_lib.c +++ b/sound/isa/ad1848/ad1848_lib.c | |||
@@ -1202,10 +1202,8 @@ int snd_ad1848_add_ctl(struct snd_ad1848 *chip, const char *name, int index, int | |||
1202 | strlcpy(ctl->id.name, name, sizeof(ctl->id.name)); | 1202 | strlcpy(ctl->id.name, name, sizeof(ctl->id.name)); |
1203 | ctl->id.index = index; | 1203 | ctl->id.index = index; |
1204 | ctl->private_value = value; | 1204 | ctl->private_value = value; |
1205 | if ((err = snd_ctl_add(chip->card, ctl)) < 0) { | 1205 | if ((err = snd_ctl_add(chip->card, ctl)) < 0) |
1206 | snd_ctl_free_one(ctl); | ||
1207 | return err; | 1206 | return err; |
1208 | } | ||
1209 | return 0; | 1207 | return 0; |
1210 | } | 1208 | } |
1211 | 1209 | ||