diff --git a/tests/client/torture_rekey.c b/tests/client/torture_rekey.c index a70b39d6..c599332d 100644 --- a/tests/client/torture_rekey.c +++ b/tests/client/torture_rekey.c @@ -269,6 +269,7 @@ static void torture_rekey_recv(void **state) int fd; sftp_file file; mode_t mask; + int rc; /* The blocks limit is set correctly */ c = s->ssh.session->current_crypto; @@ -302,6 +303,8 @@ static void torture_rekey_recv(void **state) assert_int_equal(byteswritten, bytesread); } + rc = sftp_close(file); + assert_int_equal(rc, SSH_NO_ERROR); close(fd); /* The rekey limit was restored in the new crypto to the same value */ @@ -465,6 +468,7 @@ static void torture_rekey_server_recv(void **state) int fd; sftp_file file; mode_t mask; + int rc; /* Copy the initial secret hash = session_id so we know we changed keys later */ c = s->ssh.session->current_crypto; @@ -492,6 +496,8 @@ static void torture_rekey_server_recv(void **state) assert_int_equal(byteswritten, bytesread); } + rc = sftp_close(file); + assert_int_equal(rc, SSH_NO_ERROR); close(fd); /* Check that the secret hash is different than initially */