All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: alexious@zju.edu.cn
Cc: "Takashi Iwai" <tiwai@suse.de>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [v2] ALSA: hdsp: fix some memleaks in snd_hdsp_hwdep_ioctl
Date: Sun, 07 Jan 2024 09:40:34 +0100	[thread overview]
Message-ID: <87msthilj1.wl-tiwai@suse.de> (raw)
In-Reply-To: <21989c36.77f56.18ce306a4c1.Coremail.alexious@zju.edu.cn>

On Sun, 07 Jan 2024 09:25:12 +0100,
alexious@zju.edu.cn wrote:
> 
>  
> > On Wed, 27 Dec 2023 07:03:20 +0100,
> > Zhipeng Lu wrote:
> > > 
> > > When snd_hdsp_load_firmware_from_cache and snd_hdsp_enable_io fails,
> > > the hdsp->fw_uploaded needs to be free.Or there could be memleaks in
> > > snd_hdsp_hwdep_ioctl.
> > > 
> > > Fixes: 90caaef6a1ce ("ALSA: hdsp: improve firmware caching")
> > > Signed-off-by: Zhipeng Lu <alexious@zju.edu.cn>
> > 
> > Thanks for the patch, but the patch description is misleading.
> > The allocated object isn't really "leaked"; it's released at the
> > removal of the driver.
> 
> It is a little confused to me that I can't find a clear "removal" operation for 
> hdsp->fw_uploaded. Could you please give a more detailed explaination, 
> such as call chain, why hdsp->fw_uploaded is not leaked?

It's released in snd_hdsp_card_free().


Takashi

  reply	other threads:[~2024-01-07  8:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-27  6:03 [PATCH] [v2] ALSA: hdsp: fix some memleaks in snd_hdsp_hwdep_ioctl Zhipeng Lu
2023-12-29 13:21 ` Takashi Iwai
2024-01-07  8:25   ` alexious
2024-01-07  8:40     ` Takashi Iwai [this message]
2024-01-05  7:36 ` Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2024-01-05  2:23 kernel test robot

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=87msthilj1.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alexious@zju.edu.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.