Fix unlikely memory leak introduced in 418f3d6298

This is CID 1416880; bug not in any released Tor.
This commit is contained in:
Nick Mathewson 2017-08-28 10:08:52 -04:00
parent b27c029266
commit 8de4a80125

View File

@ -1549,6 +1549,7 @@ connection_or_check_valid_tls_handshake(or_connection_t *conn,
if (identity_rcvd) { if (identity_rcvd) {
if (crypto_pk_get_digest(identity_rcvd, digest_rcvd_out) < 0) { if (crypto_pk_get_digest(identity_rcvd, digest_rcvd_out) < 0) {
crypto_pk_free(identity_rcvd);
return -1; return -1;
} }
} else { } else {