From: Takashi Iwai <tiwai@suse.de>
To: raoxu <raoxu@uniontech.com>
Cc: perex@perex.cz, tiwai@suse.com, wangdicheng@kylinos.cn,
cassiogabrielcontato@gmail.com, kees@kernel.org,
guanyulin@google.com, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ALSA: usb-audio: qcom: Free QMI handle
Date: Thu, 25 Jun 2026 13:57:13 +0200 [thread overview]
Message-ID: <878q82vnmu.wl-tiwai@suse.de> (raw)
In-Reply-To: <9108EC860F3F87DF+20260623071308.2549182-1-raoxu@uniontech.com>
On Tue, 23 Jun 2026 09:13:08 +0200,
raoxu wrote:
>
> From: Xu Rao <raoxu@uniontech.com>
>
> 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>
> ---
> Changes in v2:
> - Fix the subject prefix for a single patch.
Applied now. Thanks.
Takashi
prev parent reply other threads:[~2026-06-25 11:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 7:13 raoxu
2026-06-25 11:57 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878q82vnmu.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=cassiogabrielcontato@gmail.com \
--cc=guanyulin@google.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=raoxu@uniontech.com \
--cc=tiwai@suse.com \
--cc=wangdicheng@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®