public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, v1, 4/4] env: fix memory leak in fw_env routines
Date: Fri, 14 Apr 2017 17:09:27 -0400	[thread overview]
Message-ID: <20170414210927.GE19897@bill-the-cat> (raw)
In-Reply-To: <1491408483-13228-5-git-send-email-sbabic@denx.de>

On Wed, Apr 05, 2017 at 06:08:03PM +0200, Stefano Babic wrote:

> fw_env_open allocates buffers to store the environment, but these
> buffers are never freed. This becomes quite nasty using the fw_ tools as
> library, because each access to the environment (even just reading a
> variable) generates a memory leak equal to the size of the environment.
> 
> Fix this renaming fw_env_close() as fw_env_flush(), because the function
> really flushes the environment from RAM to storage, and add a
> fw_env_close function to free the allocated resources.
> 
> Signed-off-by: Stefano Babic <sbabic@denx.de>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170414/8969b731/attachment.sig>

      reply	other threads:[~2017-04-14 21:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-05 16:07 [U-Boot] [PATCH v1 0/4] env tools fixes Stefano Babic
2017-04-05 16:08 ` [U-Boot] [PATCH v1 1/4] Rename aes.h to uboot_aes.h Stefano Babic
2017-04-14 21:09   ` [U-Boot] [U-Boot,v1,1/4] " Tom Rini
2017-04-05 16:08 ` [U-Boot] [PATCH v1 2/4] env: split fw_env.h in public and private parts Stefano Babic
2017-04-14 21:09   ` [U-Boot] [U-Boot, v1, " Tom Rini
2017-04-05 16:08 ` [U-Boot] [PATCH v1 3/4] env: add a version number to check API Stefano Babic
2017-04-14 21:09   ` [U-Boot] [U-Boot, v1, " Tom Rini
2017-04-05 16:08 ` [U-Boot] [PATCH v1 4/4] env: fix memory leak in fw_env routines Stefano Babic
2017-04-14 21:09   ` Tom Rini [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=20170414210927.GE19897@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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