]> git.dujemihanovic.xyz Git - linux.git/commit
selftests: mptcp: always close input's FD if opened
authorLiu Jing <liujing@cmss.chinamobile.com>
Sat, 27 Jul 2024 09:04:03 +0000 (11:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Jul 2024 12:31:27 +0000 (13:31 +0100)
commit7c70bcc2a84cf925f655ea1ac4b8088062b144a3
tree402867947e6b51f15027dafd583d0fc5fc09fcd1
parent4a2f48992ddf4b8c2fba846c6754089edae6db5a
selftests: mptcp: always close input's FD if opened

In main_loop_s function, when the open(cfg_input, O_RDONLY) function is
run, the last fd is not closed if the "--cfg_repeat > 0" branch is not
taken.

Fixes: 05be5e273c84 ("selftests: mptcp: add disconnect tests")
Cc: stable@vger.kernel.org
Signed-off-by: Liu Jing <liujing@cmss.chinamobile.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/mptcp/mptcp_connect.c