diff options
author | FdaSilvaYY <fdasilvayy@gmail.com> | 2016-06-27 21:57:58 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-07-05 17:45:50 +0100 |
commit | 68efafc513788863339c199d22048ef275832094 (patch) | |
tree | 2a409883db3b7f56d4571d77735c964bed640669 /crypto/ct/ct_log.c | |
parent | c2d551c01930df54bce6517cfecd214db6e98e80 (diff) |
Add checks on sk_TYPE_push() returned value
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto/ct/ct_log.c')
-rw-r--r-- | crypto/ct/ct_log.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/ct/ct_log.c b/crypto/ct/ct_log.c index 6fc21b7269..7298f1bfd4 100644 --- a/crypto/ct/ct_log.c +++ b/crypto/ct/ct_log.c @@ -182,7 +182,10 @@ static int ctlog_store_load_log(const char *log_name, int log_name_len, return 1; } - sk_CTLOG_push(load_ctx->log_store->logs, ct_log); + if (!sk_CTLOG_push(load_ctx->log_store->logs, ct_log)) { + CTLOG_free(ct_log); + return -1; + } return 1; } |