Re: [PATCH v2] ALSA: usb-audio: qcom: Free QMI handle

From: Takashi Iwai

Date: Thu Jun 25 2026 - 07:58:18 EST


On Tue, 23 Jun 2026 09:13:08 +0200,
raoxu wrote:
>
> From: Xu Rao <raoxu@xxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxx>
> ---
> Changes in v2:
> - Fix the subject prefix for a single patch.

Applied now. Thanks.


Takashi