You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2005/07/24 16:34:24 UTC

Re: svn commit: r15404 - trunk/subversion/libsvn_subr

ghudson@tigris.org writes:

> Author: ghudson
> Date: Sun Jul 24 11:09:48 2005
> New Revision: 15404

> @@ -691,13 +693,14 @@
>    cfg_section_t *sec;
>    apr_hash_index_t *opt_ndx;
>    int count;
> +  apr_pool_t *subpool = svn_pool_create (cfg->x_pool);
>  
>    find_option (cfg, section, NULL, &sec);
>    if (sec == NULL)
>      return 0;

Better delay creating the subpool or that return will leak.

>  
>    count = 0;
> -  for (opt_ndx = apr_hash_first (cfg->x_pool, sec->options);
> +  for (opt_ndx = apr_hash_first (subpool, sec->options);
>         opt_ndx != NULL;
>         opt_ndx = apr_hash_next (opt_ndx))
>      {
> @@ -714,6 +717,7 @@
>          break;
>      }
>  
> +  svn_pool_destroy (subpool);
>    return count;
>  }

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r15404 - trunk/subversion/libsvn_subr

Posted by Greg Hudson <gh...@MIT.EDU>.
On Sun, 2005-07-24 at 17:34 +0100, Philip Martin wrote:
> Better delay creating the subpool or that return will leak.

Thanks.  Fixed in r15434.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org