@@ -70,8 +70,8 @@ static oidc_cache_cfg_redis_t *oidc_cache_redis_cfg_create(apr_pool_t *pool) {
7070 return context ;
7171}
7272
73- int oidc_cache_redis_post_config (server_rec * s , oidc_cfg_t * cfg , const char * name ) {
74- oidc_cache_cfg_redis_t * context = oidc_cache_redis_cfg_create (s -> process -> pool );
73+ int oidc_cache_redis_post_config (apr_pool_t * pool , server_rec * s , oidc_cfg_t * cfg , const char * name ) {
74+ oidc_cache_cfg_redis_t * context = oidc_cache_redis_cfg_create (pool );
7575 cfg -> cache .cfg = context ;
7676
7777 /* parse the host:post tuple from the configuration */
@@ -82,10 +82,10 @@ int oidc_cache_redis_post_config(server_rec *s, oidc_cfg_t *cfg, const char *nam
8282 }
8383
8484 if (cfg -> cache .redis_username != NULL ) {
85- context -> username = apr_pstrdup (s -> process -> pool , cfg -> cache .redis_username );
85+ context -> username = apr_pstrdup (pool , cfg -> cache .redis_username );
8686 }
8787 if (cfg -> cache .redis_password != NULL ) {
88- context -> passwd = apr_pstrdup (s -> process -> pool , cfg -> cache .redis_password );
88+ context -> passwd = apr_pstrdup (pool , cfg -> cache .redis_password );
8989 }
9090
9191 if (oidc_cfg_cache_redis_database_get (cfg ) != OIDC_CONFIG_POS_INT_UNSET )
@@ -100,7 +100,7 @@ int oidc_cache_redis_post_config(server_rec *s, oidc_cfg_t *cfg, const char *nam
100100 if (oidc_cfg_cache_redis_timeout_get (cfg ) != OIDC_CONFIG_POS_INT_UNSET )
101101 context -> timeout .tv_sec = oidc_cfg_cache_redis_timeout_get (cfg );
102102
103- if (oidc_cache_mutex_post_config (s , context -> mutex , name ) == FALSE)
103+ if (oidc_cache_mutex_post_config (pool , s , context -> mutex , name ) == FALSE)
104104 return HTTP_INTERNAL_SERVER_ERROR ;
105105
106106 return OK ;
@@ -122,15 +122,15 @@ apr_status_t oidc_cache_redis_disconnect(oidc_cache_cfg_redis_t *context) {
122122/*
123123 * initialize the Redis struct the specified Redis server
124124 */
125- static int oidc_cache_redis_post_config_impl (server_rec * s ) {
125+ static int oidc_cache_redis_post_config_impl (apr_pool_t * pool , server_rec * s ) {
126126 apr_status_t rv = APR_SUCCESS ;
127127 oidc_cache_cfg_redis_t * context = NULL ;
128128 oidc_cfg_t * cfg = (oidc_cfg_t * )ap_get_module_config (s -> module_config , & auth_openidc_module );
129129
130130 if (cfg -> cache .cfg != NULL )
131131 return OK ;
132132
133- if (oidc_cache_redis_post_config (s , cfg , "redis" ) != OK )
133+ if (oidc_cache_redis_post_config (pool , s , cfg , "redis" ) != OK )
134134 return HTTP_INTERNAL_SERVER_ERROR ;
135135
136136 context = (oidc_cache_cfg_redis_t * )cfg -> cache .cfg ;
@@ -143,8 +143,7 @@ static int oidc_cache_redis_post_config_impl(server_rec *s) {
143143 }
144144
145145 char * scope_id ;
146- rv = apr_parse_addr_port (& context -> host_str , & scope_id , & context -> port , cfg -> cache .redis_server ,
147- s -> process -> pool );
146+ rv = apr_parse_addr_port (& context -> host_str , & scope_id , & context -> port , cfg -> cache .redis_server , pool );
148147 if (rv != APR_SUCCESS ) {
149148 oidc_serror (s , "failed to parse cache server: '%s'" , cfg -> cache .redis_server );
150149 return HTTP_INTERNAL_SERVER_ERROR ;
@@ -524,14 +523,14 @@ apr_byte_t oidc_cache_redis_set(request_rec *r, const char *section, const char
524523 return rv ;
525524}
526525
527- static int oidc_cache_redis_destroy_impl (server_rec * s ) {
526+ static int oidc_cache_redis_destroy_impl (apr_pool_t * pool , server_rec * s ) {
528527 oidc_cfg_t * cfg = (oidc_cfg_t * )ap_get_module_config (s -> module_config , & auth_openidc_module );
529528 oidc_cache_cfg_redis_t * context = (oidc_cache_cfg_redis_t * )cfg -> cache .cfg ;
530529
531530 if (context != NULL ) {
532- oidc_cache_mutex_lock (s -> process -> pool , s , context -> mutex );
531+ oidc_cache_mutex_lock (pool , s , context -> mutex );
533532 context -> disconnect (context );
534- oidc_cache_mutex_unlock (s -> process -> pool , s , context -> mutex );
533+ oidc_cache_mutex_unlock (pool , s , context -> mutex );
535534 if (oidc_cache_mutex_destroy (s , context -> mutex ) != TRUE) {
536535 oidc_serror (s , "oidc_cache_mutex_destroy on refresh mutex failed" );
537536 }
0 commit comments