From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Sat, 12 Sep 2015 08:51:13 -0400 Subject: [U-Boot] [U-Boot, 02/10] ext4: avoid calling ext4fs_mount() twice, which leaks In-Reply-To: <1441425831-3441-2-git-send-email-swarren@wwwdotorg.org> References: <1441425831-3441-2-git-send-email-swarren@wwwdotorg.org> Message-ID: <20150912125113.GZ26226@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Sep 04, 2015 at 10:03:43PM -0600, Stephen Warren wrote: > From: Stephen Warren > > ext4_write_file() is only called from the "fs" layer, which calls both > ext4fs_mount() and ext4fs_close() before/after calling ext4_write_file(). > Fix ext4_write_file() not to call ext4fs_mount() again, since the mount > operation malloc()s some RAM which is leaked when a second mount call > over-writes the pointer to that data, if no intervening close call is > made. > > Signed-off-by: Stephen Warren > Acked-by: Lukasz Majewski > Tested-by: Lukasz Majewski Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: