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:
Bob Song
2026-08-12 07:30:03 +02:00
committed by Takashi Iwai
parent 67300656f6
commit 3cd6cb2dc9
+2
View File
@@ -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)