From: Tom Rini Date: Mon, 9 Oct 2017 13:01:46 -0400 Subject: [U-Boot] [U-Boot, v2, 2/2] fs/fat: Check malloc return values and fix memory leaks In-Reply-To: <20170930232522.8152-2-tuomas.tynkkynen@iki.fi> References: <20170930232522.8152-2-tuomas.tynkkynen@iki.fi> Message-ID: <20171009170146.GQ12015@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 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 > Reviewed-by: Tom Rini 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: