diff options
| author | Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn> | 2025-12-20 00:28:45 +0800 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2025-12-23 10:43:43 +0100 |
| commit | 830988b6cf197e6dcffdfe2008c5738e6c6c3c0f (patch) | |
| tree | 9f7fabaf3d02cd76c1f2ca350738308b25c97c62 /include | |
| parent | 17753d1755a589659433ff4ead595f2bb7f695a8 (diff) | |
ALSA: ac97: fix a double free in snd_ac97_controller_register()
If ac97_add_adapter() fails, put_device() is the correct way to drop
the device reference. kfree() is not required.
Add kfree() if idr_alloc() fails and in ac97_adapter_release() to do
the cleanup.
Found by code review.
Fixes: 74426fbff66e ("ALSA: ac97: add an ac97 bus")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Link: https://patch.msgid.link/20251219162845.657525-1-lihaoxiang@isrc.iscas.ac.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
