Parent: 7a638557049441ec055729055dcfb5fc38c5d06a
Author: Bastien Nocera <hadess@hadess.net>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2024-05-16 23:37:30
Tree: 3fd8d1af4dc45505345f53184399a5220bd04eca
test-runner: Fix fd leak on failure Error: RESOURCE_LEAK (CWE-772): [#def65] [important] tools/test-runner.c:877:3: open_fn: Returning handle opened by "attach_proto". tools/test-runner.c:877:3: var_assign: Assigning: "serial_fd" = handle returned from "attach_proto(node, 0U, basic_flags, extra_flags)". tools/test-runner.c:955:3: leaked_handle: Handle variable "serial_fd" going out of scope leaks the handle. 953| if (pid < 0) { 954| perror("Failed to fork new process"); 955|-> return; 956| } 957|
Diffstat
| M | tools/test-runner.c | | | 2 | ++ |
1 files changed, 2 insertions(+), 0 deletions(-)