[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 5687 - in trunk/subversion: libsvn_client libsvn_wc tests/clients/cmdline

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-04-22 01:36:11 CEST

kfogel@tigris.org writes:

> + /* Make sure our entry exists in the parent. */
> + {
> + svn_wc_adm_access_t *paccess;
> +
> + svn_path_split (svn_wc_adm_access_path (loggy->adm_access), &pdir,
> + &base_name, pool);
> +
> + err = svn_wc_adm_retrieve (&paccess, loggy->adm_access, pdir, pool);
> + if (err && (err->apr_err == SVN_ERR_WC_NOT_LOCKED))
> + SVN_ERR (svn_wc_adm_open (&paccess, NULL, pdir, TRUE, FALSE, pool));

This leaks the error err.

The associated baton is NULL, and the returned baton is not explicitly
closed, thus the lock only gets removed by a pool cleanup handler. Is
this intentional? Not explicitly closing write access batons has
cause me a problem in the past.

> + else if (err)
> + return err;
> +
> + SVN_ERR (svn_wc_entries_read (&entries, paccess, FALSE, pool));
> + if (apr_hash_get (entries, base_name, APR_HASH_KEY_STRING))
> + {
> + if ((err = svn_wc__entry_modify (paccess, base_name, entry,
> + (SVN_WC__ENTRY_MODIFY_SCHEDULE
> + | SVN_WC__ENTRY_MODIFY_COPIED
> + | SVN_WC__ENTRY_MODIFY_DELETED
> + | SVN_WC__ENTRY_MODIFY_FORCE),
> + TRUE, pool)))
> + return svn_error_createf (SVN_ERR_WC_BAD_ADM_LOG, err,
> + "error merge_syncing '%s'", name);
> + }
> + }
>
> return SVN_NO_ERROR;
> }

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Apr 22 01:36:53 2003

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.