]> git.dujemihanovic.xyz Git - u-boot.git/commit
fdtgrep: Fix logic of free() in do_fdtgrep()
authorSimon Glass <sjg@chromium.org>
Tue, 12 Jun 2018 06:04:58 +0000 (00:04 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 19 Jun 2018 11:31:43 +0000 (07:31 -0400)
commite178db1d7736a92951fdc7f1fd9b8ecf4d2877ba
tree13dcbc415e233868834eb2ba55ae20d18f497a00
parentaf880e247d502844e01219995cbdbee4b3e6d204
fdtgrep: Fix logic of free() in do_fdtgrep()

This loop never actually exits, but the way the code is written this is
not obvious. Add an explicit error check.

Reported-by: Coverity (CID: 131280)
Signed-off-by: Simon Glass <sjg@chromium.org>
[trini: Add explicit init of region to NULL per LLVM warning]
Signed-off-by: Tom Rini <trini@konsulko.com>
tools/fdtgrep.c