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

Re: svn commit: r39507 - trunk/subversion/libsvn_client

From: Senthil Kumaran S <senthil_at_collab.net>
Date: Tue, 22 Sep 2009 17:48:51 +0530

Greg Stein wrote:
> On Tue, Sep 22, 2009 at 05:31, Senthil Kumaran S <senthil_at_collab.net> wrote:
>> ...
>> +++ trunk/subversion/libsvn_client/commit_util.c Tue Sep 22 02:31:19 2009 (r39507)
>> @@ -796,9 +796,10 @@ harvest_committables(apr_hash_t *committ
>> /* A missing, schedule-delete child dir is
>> allowable. Just don't try to recurse. */
>> svn_node_kind_t childkind;
>> - svn_error_t *err = svn_io_check_path(full_path,
>> - &childkind,
>> - iterpool);
>> + svn_error_clear(err);
>> + err = svn_io_check_path(full_path,
>> + &childkind,
>> + iterpool);
>> if (! err
>> && (childkind == svn_node_none)
>> && (this_entry->schedule
>
> That call to svn_error_clear() is wrong. If ERR has a value to be
> cleared, then it should have been done higher in the function, where
> it got set. It should not "simply hang out" and wait for this code to
> clear it. Likewise, if there is no error, then this shouldn't be
> invoked. Worse, this might try to do some kind of double-free which is
> also very bad.

Greg, thanks for catching it, I ve committed a proper fix in r39514. As you
have mentioned, ERR value is cleared higher in the function and this clear is
unnecessary. The 'if ... else' block clears ERR for this part of the code.

Thank You.

-- 
Senthil Kumaran S
http://www.stylesen.org/
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2397792
Received on 2009-09-22 14:19:16 CEST

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