From: Hans de Goede <hdegoede@redhat.com>
To: Xiangyang Zhang <xyz.sun.ok@gmail.com>, gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, fabioaiuto83@gmail.com,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: Fix a resource leak in sd_int_dpc
Date: Mon, 28 Jun 2021 17:35:26 +0200 [thread overview]
Message-ID: <1ed687fa-3831-8dcf-35a4-6e32f5c26e97@redhat.com> (raw)
In-Reply-To: <20210628152239.5475-1-xyz.sun.ok@gmail.com>
Hi,
On 6/28/21 5:22 PM, Xiangyang Zhang wrote:
> The "c2h_evt" variable is not freed when function call
> "c2h_evt_read_88xx" failed
>
> Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
> Signed-off-by: Xiangyang Zhang <xyz.sun.ok@gmail.com>
Thanks, patch looks good to me:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
> ---
> drivers/staging/rtl8723bs/hal/sdio_ops.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c
> index 2dd251ce177e..a545832a468e 100644
> --- a/drivers/staging/rtl8723bs/hal/sdio_ops.c
> +++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c
> @@ -909,6 +909,8 @@ void sd_int_dpc(struct adapter *adapter)
> } else {
> rtw_c2h_wk_cmd(adapter, (u8 *)c2h_evt);
> }
> + } else {
> + kfree(c2h_evt);
> }
> } else {
> /* Error handling for malloc fail */
>
prev parent reply other threads:[~2021-06-28 15:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-28 15:22 Xiangyang Zhang
2021-06-28 15:35 ` Hans de Goede [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=1ed687fa-3831-8dcf-35a4-6e32f5c26e97@redhat.com \
--to=hdegoede@redhat.com \
--cc=Larry.Finger@lwfinger.net \
--cc=fabioaiuto83@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=xyz.sun.ok@gmail.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®