From: Willy Tarreau Date: Mon, 22 Mar 2021 20:10:12 +0000 (+0100) Subject: CLEANUP: ssl: use pool_zalloc() in ssl_init_keylog() X-Git-Tag: v2.4-dev14~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f208ac06169cdcdeec0f1fee18a7128fca509beb;p=thirdparty%2Fhaproxy.git CLEANUP: ssl: use pool_zalloc() in ssl_init_keylog() This one used to alloc then zero the area, let's have the allocator do it. --- diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 83b9d11422..527ec8001a 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -1788,12 +1788,10 @@ static void ssl_init_keylog(struct connection *conn, int write_p, int version, if (SSL_get_ex_data(ssl, ssl_keylog_index)) return; - keylog = pool_alloc(pool_head_ssl_keylog); + keylog = pool_zalloc(pool_head_ssl_keylog); if (!keylog) return; - memset(keylog, 0, sizeof(*keylog)); - if (!SSL_set_ex_data(ssl, ssl_keylog_index, keylog)) { pool_free(pool_head_ssl_keylog, keylog); return;