From: William A. Rowe Jr Date: Mon, 29 Oct 2001 15:19:03 +0000 (+0000) Subject: Use the _setn flavor which will avoid strdup'ing these strings, and X-Git-Tag: 2.0.27~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da3ae7591eede5f612e74c88e8c3f8f28a39effa;p=thirdparty%2Fapache%2Fhttpd.git Use the _setn flavor which will avoid strdup'ing these strings, and skip the cleanups we don't need. Submitted by: Brian Pane git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91681 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c index 95ff9d7ad78..3ce3de027b7 100644 --- a/modules/loggers/mod_log_config.c +++ b/modules/loggers/mod_log_config.c @@ -1024,8 +1024,8 @@ static config_log_state *open_config_log(server_rec *s, apr_pool_t *p, */ apr_pool_userdata_get(&data, userdata_key, s->process->pool); if (!data) { - apr_pool_userdata_set((const void *)1, userdata_key, - apr_pool_cleanup_null, s->process->pool); + apr_pool_userdata_setn((const void *)1, userdata_key, + NULL, s->process->pool); /* If logging for the first time after a restart, keep going. */ if (!ap_my_generation) { return cls; diff --git a/server/request.c b/server/request.c index d1e57aaec59..3cb36d7e3e2 100644 --- a/server/request.c +++ b/server/request.c @@ -328,8 +328,7 @@ static walk_cache_t *prep_walk_cache(const char *cache_name, request_rec *r) cache = apr_pcalloc(r->pool, sizeof(*cache)); cache->walked = apr_array_make(r->pool, 4, sizeof(walk_walked_t)); } - apr_pool_userdata_set(cache, cache_name, - apr_pool_cleanup_null, r->pool); + apr_pool_userdata_setn(cache, cache_name, NULL, r->pool); } return cache; }