From: Pavel Skripkin <paskripkin@gmail.com>
To: Peiwei Hu <jlu.hpw@foxmail.com>, gregkh@linuxfoundation.org
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
trivial@kernel.org
Subject: Re: [PATCH] staging: rtl8192e: rtllib_module: add free for error exit
Date: Mon, 27 Dec 2021 20:42:52 +0300 [thread overview]
Message-ID: <671aa7f6-7dd2-792c-73bf-a8092f9e7910@gmail.com> (raw)
In-Reply-To: <tencent_D7DF0257121D1A21F136595372ED101BA10A@qq.com>
On 12/27/21 11:07, Peiwei Hu wrote:
> Original source code of alloc_rtllib returns directly in
> error, without freeing variable dev.
>
> Signed-off-by: Peiwei Hu <jlu.hpw@foxmail.com>
> ---
> drivers/staging/rtl8192e/rtllib_module.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8192e/rtllib_module.c b/drivers/staging/rtl8192e/rtllib_module.c
> index 64d9feee1f39..18d898714c5c 100644
> --- a/drivers/staging/rtl8192e/rtllib_module.c
> +++ b/drivers/staging/rtl8192e/rtllib_module.c
> @@ -125,7 +125,7 @@ struct net_device *alloc_rtllib(int sizeof_priv)
>
> ieee->pHTInfo = kzalloc(sizeof(struct rt_hi_throughput), GFP_KERNEL);
> if (!ieee->pHTInfo)
> - return NULL;
> + goto failed;
>
> HTUpdateDefaultSetting(ieee);
> HTInitializeHTInfo(ieee);
This one is already fixed in staging-testing branch. See commit
e730cd57ac2dfe94bca0f14a3be8e1b21de41a9c
With regards,
Pavel Skripkin
prev parent reply other threads:[~2021-12-27 17:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-27 8:07 [PATCH] staging: rtl8192e: rtllib_module: add free for error exit Peiwei Hu
2021-12-27 17:42 ` Pavel Skripkin [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=671aa7f6-7dd2-792c-73bf-a8092f9e7910@gmail.com \
--to=paskripkin@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jlu.hpw@foxmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=trivial@kernel.org \
/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