]> granicus.if.org Git - apache/commitdiff
Fix the initial cache structure allocation. Since we are calling util_ald_create_cac...
authorBradley Nicholes <bnicholes@apache.org>
Tue, 16 Dec 2003 20:20:09 +0000 (20:20 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Tue, 16 Dec 2003 20:20:09 +0000 (20:20 +0000)
Submitted by: Matthieu Estrade [apache@moresecurity.org]
Reviewed by: Brad Nicholes

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102073 13f79535-47bb-0310-9956-ffa450edef68

modules/experimental/util_ldap_cache_mgr.c

index 1046dc6c0f94b2a8a7bc9bbbfc79ce79daad78f0..4deafe61e9be357efe92278633a65b4e4c4d5aa8 100644 (file)
@@ -301,9 +301,9 @@ util_ald_cache_t *util_ald_create_cache(util_ldap_state_t *st,
         return NULL;
 
 #if APR_HAS_SHARED_MEMORY
-    cache = (util_ald_cache_t *)util_ald_alloc(st->cache_rmm, sizeof(util_ald_cache_t));
+    cache = (util_ald_cache_t *)apr_rmm_addr_get(st->cache_rmm, apr_rmm_calloc(st->cache_rmm, sizeof(util_ald_cache_t)));
 #else
-    cache = (util_ald_cache_t *)util_ald_alloc(NULL, sizeof(util_ald_cache_t));
+    cache = (util_ald_cache_t *)calloc(sizeof(util_ald_cache_t), 1);
 #endif
     if (!cache)
         return NULL;