From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Xidong Wang <wangxidong_97@163.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Xidong Wang <2711406067@qq.com>
Subject: Re: [PATCH 1/1] taging: fbtft: fix memory leak
Date: Tue, 3 Apr 2018 15:29:34 +0200 [thread overview]
Message-ID: <20180403132934.GA1728@kroah.com> (raw)
In-Reply-To: <1522761268-7176-1-git-send-email-wangxidong_97@163.com>
On Tue, Apr 03, 2018 at 09:14:28PM +0800, Xidong Wang wrote:
> From: Xidong Wang <2711406067@qq.com>
>
> In function fbtft_framebuffer_alloc(), the memory allocated by
> framebuffer_alloc() is not released on the error path that txbuflen > 0
> and txbuf, which holds the return value of devm_kzalloc(), is NULL.
> This will result in a memory leak bug.
>
> Signed-off-by: Xidong Wang <2711406067@qq.com>
> ---
> drivers/staging/fbtft/fbtft-core.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>
next prev parent reply other threads:[~2018-04-03 13:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-03 13:14 [PATCH 1/1] taging: fbtft: fix memory leak Xidong Wang
2018-04-03 13:29 ` Greg Kroah-Hartman [this message]
2018-04-03 13:52 ` Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2018-04-03 13:33 Xidong Wang
2018-04-03 16:20 ` Joe Perches
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=20180403132934.GA1728@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=2711406067@qq.com \
--cc=devel@driverdev.osuosl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=thomas.petazzoni@free-electrons.com \
--cc=wangxidong_97@163.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