httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <rpl...@apache.org>
Subject Re: svn commit: r450188 - /httpd/httpd/trunk/modules/cache/mod_disk_cache.c
Date Tue, 26 Sep 2006 22:16:31 GMT


On 09/26/2006 10:35 PM, wrote:
> Author: minfrin
> Date: Tue Sep 26 13:35:42 2006
> New Revision: 450188
> 

> 
> Modified: httpd/httpd/trunk/modules/cache/mod_disk_cache.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_disk_cache.c?view=diff&rev=450188&r1=450187&r2=450188
> ==============================================================================
> --- httpd/httpd/trunk/modules/cache/mod_disk_cache.c (original)
> +++ httpd/httpd/trunk/modules/cache/mod_disk_cache.c Tue Sep 26 13:35:42 2006
> @@ -985,7 +985,8 @@
>  }
>  
>  
> -static apr_status_t copy_body(apr_file_t *srcfd, apr_off_t srcoff, 
> +static apr_status_t copy_body(apr_pool_t *p,
> +                              apr_file_t *srcfd, apr_off_t srcoff, 
>                                apr_file_t *destfd, apr_off_t destoff, 
>                                apr_off_t len)
>  {
> @@ -993,7 +994,11 @@
>      apr_size_t size;
>      apr_finfo_t finfo;
>      apr_time_t starttime = apr_time_now();
> -    char buf[CACHE_BUF_SIZE];
> +
> +    char *buf = apr_palloc(p, CACHE_BUF_SIZE);

Are we sure that we do not iterate too often (> 100) over this during the lifetime
of a request? I would say 'No, we do not iterate too often', but I think a crosscheck
by someone else is a good idea. Otherwise we would have a potential temporary memory
leak here.

Regards

RĂ¼diger


Mime
View raw message