mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-06 17:35:20 +02:00
ALSA: mixer_oss: Remove some incorrect kfree_const() usages
[ Upstream commit368e4663c5
] "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:454f5ec1d2
("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
0152c81f61
commit
466129e3d0
|
@ -967,8 +967,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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user