From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Sat, 7 Oct 2017 09:09:00 -0400 Subject: [U-Boot] test/overlay: Fix various malloc/free leaks In-Reply-To: <1506444192-3615-1-git-send-email-trini@konsulko.com> References: <1506444192-3615-1-git-send-email-trini@konsulko.com> Message-ID: <20171007130900.GD25966@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 Tue, Sep 26, 2017 at 12:43:12PM -0400, Tom Rini wrote: > With the overlay tests now being built in sandbox Coverity has found a > number of issues in the tests. In short, if malloc ever failed we would > leak the previous mallocs, so we need to do the usual goto pattern to > free each in turn. Finally, we always looked at the free()d location to > see how many tests had failed for the return code. > > Reported-by: Coverity (CID: 167224, 167227, 167230, 167236) > Signed-off-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: