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.
This commit is contained in:
Willy Tarreau 2021-03-22 21:10:12 +01:00
parent 70490ebb12
commit f208ac0616
1 changed files with 1 additions and 3 deletions

View File

@ -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;