socket: Properly close the proxyjump FD when proxy connection fails

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit deffea5ad2)
This commit is contained in:
Jakub Jelen
2025-10-14 22:52:14 +02:00
parent 39a62cef44
commit 20d78046aa

View File

@@ -1205,6 +1205,8 @@ exit:
ssh_event_free(event);
ssh_free(jump_session);
shutdown(jump_thread_data->fd, SHUT_RDWR);
close(jump_thread_data->fd);
SAFE_FREE(jump_thread_data);
pthread_exit(NULL);