mirror of
https://github.com/torvalds/linux.git
synced 2026-09-27 11:02:03 +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:
parent
67300656f6
commit
3cd6cb2dc9
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user