[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

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

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-07-24 18:34:24 CEST

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
Received on Sun Jul 24 18:36:17 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.