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

RE: svn commit: r980811 - in /subversion/trunk/subversion/libsvn_fs_fs: fs.h fs_fs.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Sun, 1 Aug 2010 15:50:49 +0200

> -----Original Message-----
> From: 'Stefan Sperling' [mailto:stsp_at_elego.de]
> Sent: zondag 1 augustus 2010 12:48
> To: Bert Huijben
> Cc: dev_at_subversion.apache.org
> Subject: Re: svn commit: r980811 - in
> /subversion/trunk/subversion/libsvn_fs_fs: fs.h fs_fs.c
>
> On Sun, Aug 01, 2010 at 10:39:04AM +0200, Bert Huijben wrote:
> > > + if (APR_STATUS_IS_ENOENT(err->apr_err))
> > > + {
> > > + /* 1.6.0 to 1.6.11 did not copy the configuration
> file
> > > during
> > > + * hotcopy. So if we're hotcopying a repository
> which
> > > has been
> > > + * created as a hotcopy itself, it's possible that
> > > fsfs.conf
> > > + * does not exist. Ask the user to re-create it.
> > > + *
> > > + * ### It would be nice to make this a non-fatal
> error,
> > > + * ### but this function does not get an svn_fs_t
> object
> > > + * ### so we have no way of just printing a warning
> via
> > > + * ### the fs->warning() callback. */
> > > +
> > > + const char *msg;
> > > + const char *src_abspath;
> > > + const char *dst_abspath;
> > > + const char *config_relpath;
> > > +
> >
> > You leak the error in err here.
>
> No, because we quick_wrap it later:
>
> > > + return svn_error_return(svn_error_quick_wrap(err,

Yes, her you do, but before that there are a few SVN_ERR() statements that
can return WITHOUT wrapping the error.

+ SVN_ERR(svn_dirent_get_absolute(&src_abspath, src_path,
pool));
+ SVN_ERR(svn_dirent_get_absolute(&dst_abspath, dst_path,
pool));

So these two lines (from your original patch), leak the error if they return
an error message.

        Bert

> msg));
> ^^^^^^^^^^^^^^^^^^^^^^^^
> > > + }
> > > + else
> > > + return svn_error_return(err);
> > > + }
> > > + }
> > > +
Received on 2010-08-01 15:53:47 CEST

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.