projects
/
wrapfs-3.2.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5bee6f6
)
[ALSA] ad1848 double free
author
Dave Jones
<davej@redhat.com>
Thu, 14 Dec 2006 23:37:55 +0000
(
00:37
+0100)
committer
Adrian Bunk
<bunk@stusta.de>
Thu, 14 Dec 2006 23:37:55 +0000
(
00:37
+0100)
snd_ctl_add() already kfree's on error.
Coverity #956
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
sound/isa/ad1848/ad1848_lib.c
patch
|
blob
|
history
diff --git
a/sound/isa/ad1848/ad1848_lib.c
b/sound/isa/ad1848/ad1848_lib.c
index b78530d7ea90c984309908a5c36b8fd36e6178ed..ed7cdb028819d407b3a5aa895a75242f8c7e9d78 100644
(file)
--- 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
strlcpy(ctl->id.name, name, sizeof(ctl->id.name));
ctl->id.index = index;
ctl->private_value = value;
- if ((err = snd_ctl_add(chip->card, ctl)) < 0) {
- snd_ctl_free_one(ctl);
+ if ((err = snd_ctl_add(chip->card, ctl)) < 0)
return err;
- }
return 0;
}