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

Error leak in libsvn_client/revert.c

From: Max Bowsher <maxb_at_ukf.net>
Date: 2005-04-04 01:19:52 CEST

  err = svn_wc_revert2 (path, adm_access, recursive, use_commit_times,
                        ctx->cancel_func, ctx->cancel_baton,
                        ctx->notify_func2, ctx->notify_baton2,

 /* If no error, or SVN_ERR_UNVERSIONED_RESOURCE error, then we want
     to close up before returning. For any other kind of error, we
     want to leave things exactly as they were when the error
     occurred. */

  if (err && err->apr_err != SVN_ERR_UNVERSIONED_RESOURCE)
    return err;

  SVN_ERR (svn_wc_adm_close (adm_access));

  return err;

Potential error leak if svn_wc_revert2 errors, and then svn_wc_adm_close
errors too.

I don't understand that comment about when to close the adm_access and when
not, so I'm not sure how to fix it correctly.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 4 01:21:04 2005

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