SSL: error message default in object caching API.

This change initializes the "err" variable, used to produce a meaningful
diagnostics on error path, to a good safe value.
This commit is contained in:
Sergey Kandaurov 2024-10-29 00:50:40 +04:00 committed by pluknet
parent 7cd60cd475
commit 0ebc3242d9

View File

@ -138,6 +138,8 @@ ngx_ssl_cache_fetch(ngx_conf_t *cf, ngx_uint_t index, char **err,
ngx_ssl_cache_type_t *type; ngx_ssl_cache_type_t *type;
ngx_ssl_cache_node_t *cn; ngx_ssl_cache_node_t *cn;
*err = NULL;
if (ngx_ssl_cache_init_key(cf->pool, index, path, &id) != NGX_OK) { if (ngx_ssl_cache_init_key(cf->pool, index, path, &id) != NGX_OK) {
return NULL; return NULL;
} }
@ -183,6 +185,8 @@ ngx_ssl_cache_connection_fetch(ngx_pool_t *pool, ngx_uint_t index, char **err,
{ {
ngx_ssl_cache_key_t id; ngx_ssl_cache_key_t id;
*err = NULL;
if (ngx_ssl_cache_init_key(pool, index, path, &id) != NGX_OK) { if (ngx_ssl_cache_init_key(pool, index, path, &id) != NGX_OK) {
return NULL; return NULL;
} }