httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: httpd-2.0/modules/experimental util_ldap_cache_mgr.c
Date Tue, 16 Dec 2003 20:20:09 GMT
bnicholes    2003/12/16 12:20:09

  Modified:    modules/experimental util_ldap_cache_mgr.c
  Log:
  Fix the initial cache structure allocation.  Since we are calling util_ald_create_cache()
to create a util_ald_cache_t structure, we can't use util_ald_alloc() to alloc the memory
because we don't have a structure to allocate from yet.
  
  Submitted by: Matthieu Estrade [apache@moresecurity.org]
  Reviewed by: Brad Nicholes
  
  Revision  Changes    Path
  1.10      +2 -2      httpd-2.0/modules/experimental/util_ldap_cache_mgr.c
  
  Index: util_ldap_cache_mgr.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/util_ldap_cache_mgr.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- util_ldap_cache_mgr.c	16 Nov 2003 02:22:25 -0000	1.9
  +++ util_ldap_cache_mgr.c	16 Dec 2003 20:20:09 -0000	1.10
  @@ -301,9 +301,9 @@
           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;
  
  
  

Mime
View raw message