mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
ALSA: hda/ca0132: set codec->spec to NULL after freeing
ca0132_free() and dbpro_free() call kfree(codec->spec) without setting codec->spec to NULL afterward, leaving a dangling pointer. Set it to NULL. Signed-off-by: Bob Song <songxiebing@kylinos.cn> Link: https://patch.msgid.link/20260812033019.635010-1-songxiebing@kylinos.cn Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -9628,6 +9628,7 @@ static void ca0132_free(struct hda_codec *codec)
|
||||
#endif
|
||||
kfree(spec->spec_init_verbs);
|
||||
kfree(codec->spec);
|
||||
codec->spec = NULL;
|
||||
}
|
||||
|
||||
static void dbpro_free(struct hda_codec *codec)
|
||||
@@ -9638,6 +9639,7 @@ static void dbpro_free(struct hda_codec *codec)
|
||||
|
||||
kfree(spec->spec_init_verbs);
|
||||
kfree(codec->spec);
|
||||
codec->spec = NULL;
|
||||
}
|
||||
|
||||
static void ca0132_config(struct hda_codec *codec)
|
||||
|
||||
Reference in New Issue
Block a user