From: Tom Rini Date: Tue, 19 Jun 2018 14:42:32 -0400 Subject: [U-Boot] [U-Boot, v2, 5/8] fdtgrep: Separate out checking of two allocations In-Reply-To: <20180612060502.196817-6-sjg@chromium.org> References: <20180612060502.196817-6-sjg@chromium.org> Message-ID: <20180619184232.GX4609@bill-the-cat.ec.rr.com> 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, Jun 12, 2018 at 12:04:59AM -0600, Simon Glass wrote: > The current code might succeed on the first allocation and fail on the > second. Separate the checks to avoid this problem. > > Of course, free() will never fail and the chances that (when allocating > two small areas) one will succeed and one will fail are just as remote. > But this keeps coverity happy. > > Reported-by: Coverity (CID: 131226) > > Signed-off-by: Simon Glass 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: