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>
This commit is contained in:
Jakub Jelen
2025-10-14 22:52:14 +02:00
parent 320844669a
commit deffea5ad2

View File

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