[U-Boot] [U-Boot, v2, 2/2] fs/fat: Check malloc return values and fix memory leaks

Tom Rini trini at konsulko.com
Mon Oct 9 17:01:46 UTC 2017


On Sun, Oct 01, 2017 at 02:25:22AM +0300, Tuomas Tynkkynen wrote:

> Check malloc() return values and properly unwind on errors so
> memory allocated for fat_itr structures get freed properly.
> 
> Also fixes a leak of fsdata.fatbuf in fat_size().
> 
> Fixes: 2460098cffacd1 ("fs/fat: Reduce stack usage")
> Reported-by: Coverity (CID: 167225, 167233, 167234)
> Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen at iki.fi>
> Reviewed-by: Tom Rini <trini at konsulko.com>

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: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171009/98f6f13b/attachment.sig>


More information about the U-Boot mailing list