[PATCH] tools: fdtgrep: Fix handle leak

Tom Rini trini at konsulko.com
Thu Dec 8 21:23:43 CET 2022


On Wed, Nov 23, 2022 at 02:31:03PM +0300, Mikhail Ilin wrote:

> The handle "fd" was created in fdtgrep.c:708 by calling the
>  "open" function and is lost in fdtgrep.c:716 and fdtgrep.c:723.
>  Close file descriptor 'fd' before exiting with an error from function
>  utilfdt_read_err_len(const char *filename, char **buffp, off_t *len).
> 
> Fixes: 1043d0a0296a ("fdt: Add fdtgrep tool")
> Signed-off-by: Mikhail Ilin <ilin.mikhail.ol at gmail.com>
> Reviewed-by: Simon Glass <sjg at chromium.org>

Applied to u-boot/next, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20221208/8d7049b4/attachment.sig>


More information about the U-Boot mailing list