From 7dd13abe0ccdbf184303049087eea9a057b94d4b Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Tue, 5 Sep 2017 17:21:38 -0400 Subject: Add checks for alloc failing. Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/4341) (cherry picked from commit d3c3dfc5778ab2cca0d25c5959c8b814a334addb) --- crypto/ct/ct_log.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crypto/ct') diff --git a/crypto/ct/ct_log.c b/crypto/ct/ct_log.c index 6db4c3eba1..ec6fa384d5 100644 --- a/crypto/ct/ct_log.c +++ b/crypto/ct/ct_log.c @@ -198,6 +198,8 @@ int CTLOG_STORE_load_file(CTLOG_STORE *store, const char *file) char *enabled_logs; CTLOG_STORE_LOAD_CTX* load_ctx = ctlog_store_load_ctx_new(); + if (load_ctx == NULL) + goto end; load_ctx->log_store = store; load_ctx->conf = NCONF_new(NULL); if (load_ctx->conf == NULL) -- cgit v1.2.3