summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_auto_parser.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-06-26 14:54:32 +0200
committerTakashi Iwai <tiwai@suse.de>2012-06-26 14:56:20 +0200
commitee48df57c920ab876dd8cf0dcfe5b8893b98e934 (patch)
treeb41a7fde822cf3ba5ea05af6640f48d8b645e745 /sound/pci/hda/hda_auto_parser.h
parentbefae82e2906cb7155020876a531b0b8c6c8d8c8 (diff)
ALSA: hda - Fix memory leaks in Realtek & Conexant codec parsers
When moved to the helper code, forgot to release the verb arrays. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_auto_parser.h')
-rw-r--r--sound/pci/hda/hda_auto_parser.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_auto_parser.h b/sound/pci/hda/hda_auto_parser.h
index 2a7889dfbd1..632ad0ad300 100644
--- a/sound/pci/hda/hda_auto_parser.h
+++ b/sound/pci/hda/hda_auto_parser.h
@@ -157,4 +157,14 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
const struct snd_pci_quirk *quirk,
const struct hda_fixup *fixlist);
+static inline void snd_hda_gen_init(struct hda_gen_spec *spec)
+{
+ snd_array_init(&spec->verbs, sizeof(struct hda_verb *), 8);
+}
+
+static inline void snd_hda_gen_free(struct hda_gen_spec *spec)
+{
+ snd_array_free(&spec->verbs);
+}
+
#endif /* __SOUND_HDA_AUTO_PARSER_H */