diff --git a/src/ssl_sock.c b/src/ssl_sock.c index a92f9c913..3ff817277 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -3939,7 +3939,7 @@ static int ckch_inst_sni_ctx_to_sni_filters(const struct ckch_inst *ckchi, char if (!tmp_fcount) goto end; - tmp_filter = malloc(sizeof(*tmp_filter) * tmp_fcount); + tmp_filter = calloc(tmp_fcount, sizeof(*tmp_filter)); if (!tmp_filter) { errcode |= ERR_FATAL|ERR_ALERT; goto error;