summaryrefslogtreecommitdiff
path: root/test/py/u_boot_utils.py
diff options
context:
space:
mode:
authorAnton Moryakov <ant.v.moryakov@gmail.com>2025-05-16 18:25:38 +0300
committerTom Rini <trini@konsulko.com>2025-06-03 17:18:02 -0600
commita4fb99ce4e6ee62f3278d7472b9b9282d7b289ed (patch)
tree5c2a448adb9d3fa3e3a26fcfee9ef521950c5609 /test/py/u_boot_utils.py
parentd786c6b69f537ed2a64950028d270d064970d29f (diff)
tools: fix handle leak in ifdtool.c
Prevent file descriptor leaks by properly closing 'fd' and 'new_fd' when fstat() or write() operations fail. - Added close(fd) before return in open_for_read() if fstat() fails. - Added close(new_fd) before return in write_image() if write() fails. - No close needed if open() fails (fd == -1 is invalid). Signed-off-by: Anton Moryakov <ant.v.moryakov@gmail.com> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Diffstat (limited to 'test/py/u_boot_utils.py')
0 files changed, 0 insertions, 0 deletions