linux/sound/usb/qcom
Xu Rao b8ff1f3578 ALSA: usb-audio: qcom: Free QMI handle
qc_usb_audio_probe() allocates svc->uaudio_svc_hdl separately from the
uaudio_qmi_svc object.

qmi_handle_release() releases the resources owned by an initialized QMI
handle, but does not free the memory containing the struct qmi_handle
itself. The probe error path and the remove path currently release the
handle and then free svc, losing the last pointer to the separately
allocated handle.

This leaks one struct qmi_handle on each affected probe unwind and on
each successful probe/remove cycle.

Free the handle after qmi_handle_release() in both paths.

Signed-off-by: Xu Rao <raoxu@uniontech.com>
Link: https://patch.msgid.link/9108EC860F3F87DF+20260623071308.2549182-1-raoxu@uniontech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-06-25 13:56:21 +02:00
..
Makefile ASoC: Add SPDX ids to many soc files 2026-02-22 23:52:20 +00:00
mixer_usb_offload.c ALSA: usb-audio: qcom: Initialize offload control return value 2026-06-05 13:13:55 +02:00
mixer_usb_offload.h ALSA: usb-audio: qcom: Add USB offload route kcontrol 2025-04-11 13:02:33 +02:00
qc_audio_offload.c ALSA: usb-audio: qcom: Free QMI handle 2026-06-25 13:56:21 +02:00
usb_audio_qmi_v01.c ALSA: qc_audio_offload: rename dma/iova/va/cpu/phys variables 2025-05-21 14:34:10 +02:00
usb_audio_qmi_v01.h ALSA: qc_audio_offload: rename dma/iova/va/cpu/phys variables 2025-05-21 14:34:10 +02:00