summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libssl/ssl_ciph.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libssl/ssl_ciph.c b/lib/libssl/ssl_ciph.c
index 6b650ccea3b..b2a1e93688c 100644
--- a/lib/libssl/ssl_ciph.c
+++ b/lib/libssl/ssl_ciph.c
@@ -1737,6 +1737,10 @@ SSL_COMP_add_compression_method(int id, COMP_METHOD *cm)
MemCheck_off();
comp = malloc(sizeof(SSL_COMP));
+ if (comp == NULL) {
+ SSLerr(SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD, ERR_R_MALLOC_FAILURE);
+ return (1);
+ }
comp->id = id;
comp->method = cm;
load_builtin_compressions();