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:
parent
70490ebb12
commit
f208ac0616
|
@ -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))
|
if (SSL_get_ex_data(ssl, ssl_keylog_index))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
keylog = pool_alloc(pool_head_ssl_keylog);
|
keylog = pool_zalloc(pool_head_ssl_keylog);
|
||||||
if (!keylog)
|
if (!keylog)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
memset(keylog, 0, sizeof(*keylog));
|
|
||||||
|
|
||||||
if (!SSL_set_ex_data(ssl, ssl_keylog_index, keylog)) {
|
if (!SSL_set_ex_data(ssl, ssl_keylog_index, keylog)) {
|
||||||
pool_free(pool_head_ssl_keylog, keylog);
|
pool_free(pool_head_ssl_keylog, keylog);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue