Use the data, *then* free it. It works so much better.

svn:r2837
This commit is contained in:
Nick Mathewson 2004-11-13 23:27:50 +00:00
parent 0753f630e8
commit aab929abe0

View File

@ -364,13 +364,13 @@ connection_tls_finish_handshake(connection_t *conn) {
} }
log_fn(LOG_DEBUG,"The router's cert is valid."); log_fn(LOG_DEBUG,"The router's cert is valid.");
crypto_pk_get_digest(identity_rcvd, digest_rcvd); crypto_pk_get_digest(identity_rcvd, digest_rcvd);
crypto_free_pk_env(identity_rcvd);
if (crypto_pk_cmp_keys(get_identity_key(), identity_rcvd)<0) { if (crypto_pk_cmp_keys(get_identity_key(), identity_rcvd)<0) {
conn->circ_id_type = CIRC_ID_TYPE_LOWER; conn->circ_id_type = CIRC_ID_TYPE_LOWER;
} else { } else {
conn->circ_id_type = CIRC_ID_TYPE_HIGHER; conn->circ_id_type = CIRC_ID_TYPE_HIGHER;
} }
crypto_free_pk_env(identity_rcvd);
router = router_get_by_nickname(nickname); router = router_get_by_nickname(nickname);
if(router && /* we know this nickname */ if(router && /* we know this nickname */