httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: memory leak in 2.2.x balancer?
Date Tue, 27 Nov 2007 13:44:12 GMT
Worse than a leak; conf->pool should be const, touching it explodes the
copy-on-write semantics of the conf pool memory (which otherwise is a
single common resource).  There are better pools to abuse, if unavoidable,
such as process pool.

Jeff Trawick wrote:
> looks like a leak to me; what do you think?
> 
> Index: modules/proxy/mod_proxy_balancer.c
> ===================================================================
> --- modules/proxy/mod_proxy_balancer.c  (revision 598305)
> +++ modules/proxy/mod_proxy_balancer.c  (working copy)
> @@ -654,7 +654,7 @@
>          const char *val;
>          if ((val = apr_table_get(params, "ss"))) {
>              if (strlen(val))
> -                bsel->sticky = apr_pstrdup(conf->pool, val);
> +                bsel->sticky = apr_pstrdup(r->pool, val);
>              else
>                  bsel->sticky = NULL;
>          }
> 
> trunk looks much different here.  Does anyone plan to backport the
> larger changes to 2.2.x in the near term, or should we go for this
> tweak?


Mime
View raw message