Commit e944167
ASoC: SOF: Intel: hda-codec: fix possible memory leak in hda_codec_device_init()
If snd_hdac_device_register() fails, 'codec' and name allocated in
dev_set_name() called in snd_hdac_device_init() are leaked. Fix this
by calling put_device(), so they can be freed in snd_hda_codec_dev_release()
and kobject_cleanup().
Fixes: 829c673 ("ASoC: SOF: Intel: Introduce HDA codec init and exit routines")
Fixes: dfe66a1 ("ALSA: hdac_ext: add extended HDA bus")
Signed-off-by: Yang Yingliang <[email protected]>
Reviewed-by: Kai Vehmanen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>1 parent a75481f commit e944167
1 file changed
+1
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | 112 | | |
118 | 113 | | |
119 | 114 | | |
| |||
126 | 121 | | |
127 | 122 | | |
128 | 123 | | |
129 | | - | |
130 | 124 | | |
131 | 125 | | |
132 | 126 | | |
133 | 127 | | |
134 | | - | |
| 128 | + | |
135 | 129 | | |
136 | 130 | | |
137 | 131 | | |
| |||
0 commit comments