details: https://github.com/nginx/nginx/commit/0ebc3242d99d3b9d00891b3cddda11ff9c2e86c4
branches: master
commit: 0ebc3242d99d3b9d00891b3cddda11ff9c2e86c4
user: Sergey Kandaurov <pluknet@nginx.com>
date: Tue, 29 Oct 2024 00:50:40 +0400
description:
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.
---
src/event/ngx_event_openssl_cache.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/event/ngx_event_openssl_cache.c b/src/event/ngx_event_openssl_cache.c
index f43bdb5e7..8829e2879 100644
--- a/src/event/ngx_event_openssl_cache.c
+++ b/src/event/ngx_event_openssl_cache.c
@@ -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_node_t *cn;
+ *err = NULL;
+
if (ngx_ssl_cache_init_key(cf->pool, index, path, &id) != NGX_OK) {
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;
+ *err = NULL;
+
if (ngx_ssl_cache_init_key(pool, index, path, &id) != NGX_OK) {
return NULL;
}
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel