From a05adbc9f5c9b29a6d0096d99ae67ad7617ff594 Mon Sep 17 00:00:00 2001 From: Bradley Nicholes Date: Thu, 2 May 2002 22:03:58 +0000 Subject: [PATCH] By using _setn instead of _set, this call is setting a pointer to a stack variable in the hash entry. Once initialize_module() returns, the key pointer in the hash entry is invalid. This causes a fault the next time that the hash entry key is checked. Calling the _set() version will store a copy of the key which has the same lifetime as the hash table entry. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94914 13f79535-47bb-0310-9956-ffa450edef68 --- modules/aaa/mod_auth_digest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/aaa/mod_auth_digest.c b/modules/aaa/mod_auth_digest.c index 2159d5a3b4..a82b119566 100644 --- a/modules/aaa/mod_auth_digest.c +++ b/modules/aaa/mod_auth_digest.c @@ -384,7 +384,7 @@ static int initialize_module(apr_pool_t *p, apr_pool_t *plog, * set up our static data on the second call. */ apr_pool_userdata_get(&data, userdata_key, s->process->pool); if (!data) { - apr_pool_userdata_setn((const void *)1, userdata_key, + apr_pool_userdata_set((const void *)1, userdata_key, apr_pool_cleanup_null, s->process->pool); return OK; } -- 2.40.0