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

Re: svn commit: r1097257 - in /subversion/trunk/subversion: include/private/svn_wc_private.h libsvn_client/info.c libsvn_wc/info.c

From: Greg Stein <gstein_at_gmail.com>
Date: Wed, 27 Apr 2011 19:13:23 -0400

On Wed, Apr 27, 2011 at 17:49, <hwright_at_apache.org> wrote:
> Author: hwright
> Date: Wed Apr 27 21:49:00 2011
> New Revision: 1097257
>
> URL: http://svn.apache.org/viewvc?rev=1097257&view=rev
> Log:
> Move the working-copy scraping part of svn_client_info3() to libsvn_wc.
>
> This is pretty much just a straight code copy.  We can adjust a number of
> things after this move (using libsvn_wc-internal APIs and such), those will
> eventually follow.
>
> * subversion/include/private/svn_wc_private.h
>  (svn_wc__get_info):  New.

I know the contents of this function were simply copied from existing
code, but there is a potential error leak in there. The line:

SVN_ERR(svn_wc__get_tree_conflict(&tree_conflict, ctx->wc_ctx,

If that returns with an error, then 'err' will leak. The above line
should use an err2 variable, with appropriate management of the two
errors...

(separately, there is a lot of simplification of the various 'return'
exits at the bottom of the function)

>...

Cheers,
-g
Received on 2011-04-28 01:13:52 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.