manoj       99/06/09 22:18:10

  Modified:    src/modules/proxy proxy_cache.c
  Log:
  Fix a seg fault when the proxy is enabled but CacheRoot isn't set.
  
  Revision  Changes    Path
  1.61      +3 -1      apache-1.3/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -d -u -r1.60 -r1.61
  --- proxy_cache.c     1999/06/02 18:10:09     1.60
  +++ proxy_cache.c     1999/06/10 05:18:08     1.61
  @@ -279,7 +279,7 @@
       const struct cache_conf *conf = &pconf->cache;
   
       const char *cachedir = conf->root;
  -    char *filename = ap_palloc(r->pool, strlen(cachedir) + strlen( DOT_TIME 
) +1);
  +    char *filename;
       struct stat buf;
       int timefd;
       time_t every = conf->gcinterval;
  @@ -287,6 +287,8 @@
   
       if (cachedir == NULL || every == -1)
           return 0;
  +
  +    filename = ap_palloc(r->pool, strlen(cachedir) + strlen( DOT_TIME ) +1);
   
       garbage_now = time(NULL);
       /* Usually, the modification time of <cachedir>/.time can only increase.
  
  
  

Reply via email to