httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject cvs commit: httpd-2.0/modules/experimental mod_mem_cache.c
Date Tue, 12 Feb 2002 22:54:17 GMT
ianh        02/02/12 14:54:16

  Modified:    modules/experimental mod_mem_cache.c
  Log:
  once more with feeling
  
  obj was set before the mutex so someone could have came and updated h->cache_obj
  between us setting obj, and useing it.
  running now for 10 minutes without core (a record!)
  
  Revision  Changes    Path
  1.18      +3 -2      httpd-2.0/modules/experimental/mod_mem_cache.c
  
  Index: mod_mem_cache.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_mem_cache.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- mod_mem_cache.c	12 Feb 2002 22:11:30 -0000	1.17
  +++ mod_mem_cache.c	12 Feb 2002 22:54:16 -0000	1.18
  @@ -346,7 +346,7 @@
   
   static int remove_entity(cache_handle_t *h) 
   {
  -    cache_object_t *obj = h->cache_obj;
  +    cache_object_t *obj ;
   
       if (sconf->lock) {
           apr_thread_mutex_lock(sconf->lock);
  @@ -355,7 +355,8 @@
        * RACE .. some one might have just deleted this object .. so test
        * if it is still around
        */
  -    if (obj) {
  +    if (h->cache_obj) {
  +        obj = h->cache_obj;
           apr_hash_set(sconf->cacheht, obj->key, strlen(obj->key), NULL);
           cleanup_cache_object(obj);
           h->cache_obj = NULL;
  
  
  

Mime
View raw message