Skip to content
Commit 4b95e840 authored by Mikhail Ilin's avatar Mikhail Ilin Committed by Tom Rini
Browse files

tools: fdtgrep: Fix handle leak



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: 1043d0a0 ("fdt: Add fdtgrep tool")
Signed-off-by: default avatarMikhail Ilin <ilin.mikhail.ol@gmail.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 17f8a748
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment