On Wed, Jul 08, 2026 at 06:32:03PM -0400, Jon Maloy wrote:
s1 and send_s were not closed before returning, leaking file descriptors across the loop iterations in main().
Signed-off-by: Jon Maloy
Insignificant as a bug, since the whole program is over in
milliseconds. But might as well make the checkers happy.
Reviewed-by: David Gibson
--- doc/platform-requirements/udp-close-dup.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/doc/platform-requirements/udp-close-dup.c b/doc/platform-requirements/udp-close-dup.c index 99060fcb..abb719a5 100644 --- a/doc/platform-requirements/udp-close-dup.c +++ b/doc/platform-requirements/udp-close-dup.c @@ -87,6 +87,9 @@ static void test_close_dup(enum dup_method method) token = random(); send_token(send_s, token); recv_token(s1, token); + + close(s1); + close(send_s); }
int main(int argc, char *argv[]) -- 2.52.0
-- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson