de-fatal packet_close(): cipher_cleanup() send and receive context

even if cleanup for the first fails
This commit is contained in:
Markus Friedl
2012-01-18 13:15:44 +01:00
parent f046133614
commit d04408425a

View File

@@ -661,9 +661,10 @@ ssh_packet_close(struct ssh *ssh)
inflateEnd(stream);
}
}
if ((r = cipher_cleanup(&state->send_context)) != 0 ||
(r = cipher_cleanup(&state->receive_context)) != 0)
fatal("%s: cipher_cleanup failed: %s", __func__, ssh_err(r));
if ((r = cipher_cleanup(&state->send_context)) != 0)
error("%s: cipher_cleanup failed: %s", __func__, ssh_err(r));
if ((r = cipher_cleanup(&state->receive_context)) != 0)
error("%s: cipher_cleanup failed: %s", __func__, ssh_err(r));
}
/* Sets remote side protocol flags. */