From: Luca Coelho <luca@coelho.fi>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
johannes.berg@intel.com, emmanuel.grumbach@intel.com,
linuxwifi@intel.com, kvalo@codeaurora.org, sara.sharon@intel.com
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH v2] iwlwifi: mvm: Fix a memory leak in an error handling path in 'iwl_mvm_sar_get_wgds_table()'
Date: Wed, 19 Jul 2017 09:59:52 +0300 [thread overview]
Message-ID: <1500447592.22048.256.camel@coelho.fi> (raw)
In-Reply-To: <20170714100659.26369-1-christophe.jaillet@wanadoo.fr>
On Fri, 2017-07-14 at 12:06 +0200, Christophe JAILLET wrote:
> We should free 'wgds.pointer' here as done a few lines above in another
> error handling path.
> It was allocated within 'acpi_evaluate_object()'.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> v2: rebase after 7fe90e0e3d60 ("iwlwifi: mvm: refactor geo init")
Thanks, Christophe!
I've pushed this to our internal tree and it will eventually reach the
mainline via our normal process.
> Moreovern a comment in '/drivers/acpi/acpica/utalloc.c' states that:
> /* [...] Note: The caller should use acpi_os_free to free this
> * buffer created via ACPI_ALLOCATE_BUFFER.
> */
>
> So, at the end of this function:
> out_free:
> kfree(wgds.pointer);
> should maybe be:
> out_free:
> acpi_os_free(wgds.pointer);
>
> If correct, several places should be fixed accordingly.
Thanks for pointing out! I'm about to do some refactoring in this code
and I'll make sure I check the proper way to free the acpi buffer when
doing so.
--
Cheers,
Luca.
prev parent reply other threads:[~2017-07-19 7:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 10:06 Christophe JAILLET
2017-07-19 6:59 ` Luca Coelho [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=1500447592.22048.256.camel@coelho.fi \
--to=luca@coelho.fi \
--cc=christophe.jaillet@wanadoo.fr \
--cc=emmanuel.grumbach@intel.com \
--cc=johannes.berg@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linuxwifi@intel.com \
--cc=netdev@vger.kernel.org \
--cc=sara.sharon@intel.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 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®