httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: svn commit: r1533087 - in /httpd/httpd/trunk/modules/proxy: mod_proxy.h mod_proxy_balancer.c proxy_util.c
Date Thu, 17 Oct 2013 22:00:21 GMT
For sure the (*conn)->pool is recycled more often...

On Oct 17, 2013, at 3:52 PM, Yann Ylavic <ylavic.dev@gmail.com> wrote:

> On Thu, Oct 17, 2013 at 4:10 PM, <jim@apache.org> wrote:
> Author: jim
> Date: Thu Oct 17 14:10:43 2013
> New Revision: 1533087
> 
> @@ -2087,12 +2089,9 @@ PROXY_DECLARE(int) ap_proxy_acquire_conn
>      (*conn)->close  = 0;
>      (*conn)->inreslist = 0;
> 
> -    if (worker->s->uds) {
> +    if (*worker->s->uds_path) {
>          if ((*conn)->uds_path == NULL) {
> -            apr_uri_t puri;
> -            if (apr_uri_parse(worker->cp->pool, worker->s->name, &puri)
== APR_SUCCESS) {
> -                (*conn)->uds_path = apr_pstrdup(worker->cp->pool, puri.path);
> -            }
> +            (*conn)->uds_path = apr_pstrdup(worker->cp->pool, worker->s->uds_path);
>          }
> 
> Shouldn't that be either :
>             (*conn)->uds_path = worker->s->uds_path;
> or safer :
>             (*conn)->uds_path = apr_pstrdup((*conn)->pool, worker->s->uds_path);
> to avoid a leak?
> 
> Regards.
> 


Mime
View raw message