From 8d1203d6c57e5d7edf39874233aee92870b8c3bd Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Tue, 17 Jul 2018 00:38:32 -0400 Subject: [PATCH] Fix some malloc error handling. Thanks to Tom Thorogood for catching this. Change-Id: I09fa5d9822b9ba13b106add251e26c6ebee21b03 Reviewed-on: https://boringssl-review.googlesource.com/29825 Reviewed-by: Tom Thorogood Reviewed-by: Steven Valdez Reviewed-by: David Benjamin Commit-Queue: David Benjamin CQ-Verified: CQ bot account: commit-bot@chromium.org --- ssl/ssl_lib.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc index 52f1ccd0..90846102 100644 --- a/ssl/ssl_lib.cc +++ b/ssl/ssl_lib.cc @@ -2057,8 +2057,8 @@ int SSL_CTX_add_cert_compression_alg(SSL_CTX *ctx, uint16_t alg_id, if (!PushToStack(ctx->cert_compression_algs.get(), std::move(alg))) { if (sk_CertCompressionAlg_num(ctx->cert_compression_algs.get()) == 0) { ctx->cert_compression_algs.reset(); - return 0; } + return 0; } return 1;