Skip to content

Commit

Permalink
iperf_api: fix potential descriptor leak
Browse files Browse the repository at this point in the history
If the pid file remains, but the process has been killed,
the handle will be rewritten without closing.

Signed-off-by: Maks Mishin <[email protected]>
  • Loading branch information
maks-mishin committed Jan 16, 2025
1 parent 352ef1b commit 069a37d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/iperf_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -4884,6 +4884,7 @@ iperf_create_pidfile(struct iperf_test *test)
}
}
}
(void)close(fd);
}

/*
Expand Down

0 comments on commit 069a37d

Please sign in to comment.