summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Song <songxiebing@kylinos.cn>2026-08-12 11:30:19 +0800
committerTakashi Iwai <tiwai@suse.de>2026-08-12 07:30:03 +0200
commit3cd6cb2dc9598278235b9c76bc188cd4fbc320e5 (patch)
tree119272fe2eede2edeedd2cd153d50214f1756d05
parent67300656f6a690c0146b2bb375f3d30eb05a7bea (diff)
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>
-rw-r--r--sound/hda/codecs/ca0132.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/hda/codecs/ca0132.c b/sound/hda/codecs/ca0132.c
index 61c9fb42b1de..aa2635d8ab92 100644
--- a/sound/hda/codecs/ca0132.c
+++ b/sound/hda/codecs/ca0132.c
@@ -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)