Prevent double-free of CTLOG public key
authorRob Percival <robpercival@google.com>
Tue, 23 Aug 2016 15:55:09 +0000 (16:55 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 23 Aug 2016 19:17:14 +0000 (20:17 +0100)
commit986dbbbeffb0f998aa1e9aa80d24ddb4d10d0f73
tree95f4a83fd94184922f470191346b77793d06571f
parentcdb2a60347f988037d29adc7e4415e9c66c8a5a5
Prevent double-free of CTLOG public key

Previously, if ct_v1_log_id_from_pkey failed, public_key would be freed by
CTLOG_free at the end of the function, and then again by the caller (who
would assume ownership was not transferred when CTLOG_new returned NULL).

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
crypto/ct/ct_log.c