From: "james qian wang (Arm Technology China)" <james.qian.wang@arm.com>
To: Navid Emamdoost <navid.emamdoost@gmail.com>
Cc: David Airlie <airlied@linux.ie>, "kjlu@umn.edu" <kjlu@umn.edu>,
Liviu Dudau <Liviu.Dudau@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"emamd001@umn.edu" <emamd001@umn.edu>,
"smccaman@umn.edu" <smccaman@umn.edu>, nd <nd@arm.com>
Subject: Re: drm/komeda: prevent memory leak in komeda_wb_connector_add
Date: Fri, 27 Sep 2019 08:08:59 +0000 [thread overview]
Message-ID: <20190927080852.GA25223@jamwan02-TSP300> (raw)
In-Reply-To: <20190925043031.32308-1-navid.emamdoost@gmail.com>
On Tue, Sep 24, 2019 at 11:30:30PM -0500, Navid Emamdoost wrote:
> In komeda_wb_connector_add if drm_writeback_connector_init fails the
> allocated memory for kwb_conn should be released.
>
> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
> ---
> drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c b/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c
> index 2851cac94d86..75133f967fdb 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c
> @@ -166,8 +166,10 @@ static int komeda_wb_connector_add(struct komeda_kms_dev *kms,
> &komeda_wb_encoder_helper_funcs,
> formats, n_formats);
> komeda_put_fourcc_list(formats);
> - if (err)
> + if (err) {
> + kfree(kwb_conn);
> return err;
> + }
Thank you for the fix.
Will push it to drm-misc-fixes
Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
>
> drm_connector_helper_add(&wb_conn->base, &komeda_wb_conn_helper_funcs);
>
prev parent reply other threads:[~2019-09-27 8:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-25 4:30 [PATCH] " Navid Emamdoost
2019-09-25 5:59 ` james qian wang (Arm Technology China)
2019-09-27 8:08 ` james qian wang (Arm Technology China) [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=20190927080852.GA25223@jamwan02-TSP300 \
--to=james.qian.wang@arm.com \
--cc=Liviu.Dudau@arm.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=emamd001@umn.edu \
--cc=kjlu@umn.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=navid.emamdoost@gmail.com \
--cc=nd@arm.com \
--cc=smccaman@umn.edu \
/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®