mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Navid Emamdoost <navid.emamdoost@gmail.com>, devicetree@vger.kernel.org
Cc: Navid Emamdoost <emamd001@umn.edu>, Kangjie Lu <kjlu@umn.edu>,
	Stephen McCamant <smccaman@umn.edu>,
	Frank Rowand <frowand.list@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] of: unittest: fix memory leak in unittest_data_add
Date: Sat, 5 Oct 2019 16:34:09 +0200	[thread overview]
Message-ID: <50421413-f535-a608-fa7d-1b337eeb95e5@web.de> (raw)
In-Reply-To: <20191004185847.14074-1-navid.emamdoost@gmail.com>

> In unittest_data_add, a copy buffer is created via kmemdup. This buffer
> is leaked if of_fdt_unflatten_tree fails. The release for the
> unittest_data buffer is added.

Can a wording like the following be nicer for the change description?

  The buffer “__dtb_testcases_begin” will be duplicated to the local
  variable “unittest_data”. Release the corresponding memory
  after a call of the function “of_fdt_unflatten_tree” failed
  in the implementation of the function “unittest_data_add”.


Regards,
Markus

  reply	other threads:[~2019-10-05 14:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04 18:58 Navid Emamdoost
2019-10-05 14:34 ` Markus Elfring [this message]
2019-10-15 19:41 ` Rob Herring
2019-10-17 17:51   ` Frank Rowand

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=50421413-f535-a608-fa7d-1b337eeb95e5@web.de \
    --to=markus.elfring@web.de \
    --cc=devicetree@vger.kernel.org \
    --cc=emamd001@umn.edu \
    --cc=frowand.list@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kjlu@umn.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=navid.emamdoost@gmail.com \
    --cc=robh+dt@kernel.org \
    --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®