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

Re: svn st -u regression with 1.1.x servers

From: Erik Huelsmann <ehuels_at_gmail.com>
Date: 2005-07-18 18:37:20 CEST

On 7/18/05, steveking <steveking@gmx.ch> wrote:
> Erik Huelsmann wrote:
> >>SteveKing wrote:
> >>
> >>>I think I found the reason why it doesn't work anymore. Patch attached.
> >>>With this patch (and the one Ben Collins-Sussman sent earlier) it works
> >>>again.
> >>>
> >>>Stefan
> >>>
> >>>
> >>>------------------------------------------------------------------------
> >>>
> >>>Index: subversion/libsvn_ra_dav/fetch.c
> >>>===================================================================
> >>>--- subversion/libsvn_ra_dav/fetch.c (Revision 15306)
> >>>+++ subversion/libsvn_ra_dav/fetch.c (Arbeitskopie)
> >>>@@ -1578,7 +1578,7 @@
> >>>
> >>> /* ### Should svn_ra_dav__parsed_request() take care of storing auth
> >>> ### info itself? */
> >>>- SVN_ERR( svn_ra_dav__maybe_store_auth_info_after_result(err, ras) );
> >>>+ err = svn_ra_dav__maybe_store_auth_info_after_result(err, ras);
> >>>
> >>> if (baton.err)
> >>> return baton.err;
> >>>
> >
> >
> > If baton.err != NULL, you leak err here if that too is not NULL.
>
> hmmm - but isn't the leak there even without my patch? Or do I
> understand the pool handling completely wrong?

Without the patch you may have leaked baton.err, but you introduced
the use of the 'err' variable here. With the patch, you may leak 'err'
but not baton.err:

SVN_ERR returns an error if it finds one, continuing execution if it
doesn't. This means that if
svn_ra_dav__maybe_store_auth_info_after_result() generates an error,
you won't leak *that* error (in the old situation). In the new
situation, you don't use SVN_ERR() anymore, meaning that you need to
dispose of errors yourself.

I hope I was a bit less cryptic this time :-)

bye,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jul 18 18:38:21 2005

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