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

Re: svn commit: rev 1885 - trunk/subversion/libsvn_repos

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-05-08 00:07:51 CEST

On Mon, May 06, 2002 at 12:33:39PM -0500, sussman@tigris.org wrote:
>...
> +++ trunk/subversion/libsvn_repos/dump.c Mon May 6 12:33:39 2002
>...
> +static svn_error_t *
> +close_directory (void *dir_baton)
> +{
> + struct dir_baton *db = dir_baton;
> + struct edit_baton *eb = db->edit_baton;
> + apr_hash_index_t *hi;
> + apr_pool_t *pool = db->pool;
> + apr_pool_t *subpool = svn_pool_create (pool);
> +
> + for (hi = apr_hash_first (pool, db->deleted_entries);
> + hi;
> + hi = apr_hash_next (hi))
> + {
> + const void *key;
> + const char *path;
> + apr_hash_this (hi, &key, NULL, NULL);
> + path = key;
> +
> + /* By sending 'svn_node_unknown', the Node-kind: header simply won't
> + be written out. No big deal at all, really. The loader
> + shouldn't care. */
> + SVN_ERR (dump_node (eb->fs_root, path,
> + svn_node_unknown, node_action_delete,
> + eb->file, eb->buffer, eb->bufsize, subpool));
> + }

You missed clearing the subpool.

If you aren't going to clear the subpool, then you can simply use the
directory's pool (on the reasoning that if you add X to the subpool, then
you may as well just add X to the parent pool).

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 8 00:06:32 2002

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.