projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dee4769
)
ALSA: mixer_oss: Remove some incorrect kfree_const() usages
author
Christophe JAILLET
<christophe.jaillet@wanadoo.fr>
Thu, 26 Sep 2024 18:17:36 +0000
(20:17 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Mon, 30 Sep 2024 08:12:08 +0000
(10:12 +0200)
"assigned" and "assigned->name" are allocated in snd_mixer_oss_proc_write()
using kmalloc() and kstrdup(), so there is no point in using kfree_const()
to free these resources.
Switch to the more standard kfree() to free these resources.
This could avoid a memory leak.
Fixes:
454f5ec1d2b7
("ALSA: mixer: oss: Constify snd_mixer_oss_assign_table definition")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link:
https://patch.msgid.link/63ac20f64234b7c9ea87a7fa9baf41e8255852f7.1727374631.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/oss/mixer_oss.c
patch
|
blob
|
history
diff --git
a/sound/core/oss/mixer_oss.c
b/sound/core/oss/mixer_oss.c
index
33bf9a2
..
89b317c
100644
(file)
--- a/
sound/core/oss/mixer_oss.c
+++ b/
sound/core/oss/mixer_oss.c
@@
-901,8
+901,8
@@
static void snd_mixer_oss_slot_free(struct snd_mixer_oss_slot *chn)
struct slot *p = chn->private_data;
if (p) {
if (p->allocated && p->assigned) {
- kfree
_const
(p->assigned->name);
- kfree
_const
(p->assigned);
+ kfree(p->assigned->name);
+ kfree(p->assigned);
}
kfree(p);
}