'Stefan Sperling' wrote on Sun, Aug 01, 2010 at 22:50:25 +0200:
> On Sun, Aug 01, 2010 at 03:50:49PM +0200, Bert Huijben wrote:
> > 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.
> 
> Ah, yeah. I see. What's the best way to handle this?
> Is simply assigning err to a temporary err2 variable safe?
> I would not expect so.
> 

Why not

        err2 = svn_dirent_get_absolute();
        if (err2)
          return svn_error_compose_create(err2, err);

?

> Maybe instead of wrapping the error, we should just create a new one?
> 

Are you advocating to discard err?  Why should we do so?

> Thanks,
> Stefan

Reply via email to