You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@lyra.org> on 2002/05/07 22:07:51 UTC

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

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