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

Re: svn commit: r37871 - trunk/subversion/libsvn_wc

From: Hyrum K. Wright <hyrum_at_hyrumwright.org>
Date: Tue, 7 Jul 2009 09:12:28 -0500

I've spent the last 30 minutes trying to figure out why I thought
there was a memory error there, but for the life of me, I can't. At
this point, I guess I'm fixing bugs which don't even exist.

-Hyrum

On Jul 7, 2009, at 8:08 AM, Greg Stein wrote:

> What freed memory? I don't see where that occurred...
>
> On Thu, May 28, 2009 at 05:28, Hyrum K.
> Wright<hyrum_at_hyrumwright.org> wrote:
>> Author: hwright
>> Date: Wed May 27 20:28:39 2009
>> New Revision: 37871
>>
>> Log:
>> Slight optimization and correctness fix in followup to r37870.
>> Optimization: Combine a couple of loops.
>> Correctness Fix: Stop referencing freed memory.
>>
>> * subversion/libsvn_wc/entries.c
>> (entries_write_body): Combine the two loops.
>>
>> Modified:
>> trunk/subversion/libsvn_wc/entries.c
>>
>> Modified: trunk/subversion/libsvn_wc/entries.c
>> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/entries.c?pathrev=37871&r1=37870&r2=37871
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- trunk/subversion/libsvn_wc/entries.c Wed May 27 15:44:14
>> 2009 (r37870)
>> +++ trunk/subversion/libsvn_wc/entries.c Wed May 27 20:28:39
>> 2009 (r37871)
>> @@ -2445,6 +2445,7 @@ entries_write_body(svn_wc__db_t *db,
>> const void *key;
>> void *val;
>> const svn_wc_entry_t *this_entry;
>> + const char *child_abspath;
>>
>> svn_pool_clear(iterpool);
>>
>> @@ -2457,26 +2458,18 @@ entries_write_body(svn_wc__db_t *db,
>> continue;
>>
>> /* Write the entry. */
>> + child_abspath = svn_dirent_join(local_abspath, key, iterpool);
>> SVN_ERR(write_entry(db, wc_db, wc_id, repos_id, repos_root,
>> - this_entry, key,
>> - svn_dirent_join(local_abspath, key,
>> iterpool),
>> - this_dir, iterpool));
>> - }
>> -
>> - for (hi = apr_hash_first(scratch_pool, dav_cache); hi;
>> - hi = apr_hash_next(hi))
>> - {
>> - const void *key;
>> - void *val;
>> - const char *child_abspath;
>> -
>> - svn_pool_clear(iterpool);
>> - apr_hash_this(hi, &key, NULL, &val);
>> - child_abspath = key;
>> - child_cache = val;
>> + this_entry, key, child_abspath,
>> this_dir, iterpool));
>>
>> - SVN_ERR(svn_wc__db_base_set_dav_cache(db, child_abspath,
>> child_cache,
>> - iterpool));
>> + /* Write the dav cache.
>> + ### This can go away when we stop unconditionally
>> deleting all
>> + ### the entries before writing them (see comments above).
>> */
>> + child_cache = apr_hash_get(dav_cache, child_abspath,
>> + APR_HASH_KEY_STRING);
>> + if (child_cache)
>> + SVN_ERR(svn_wc__db_base_set_dav_cache(db, child_abspath,
>> child_cache,
>> + iterpool));
>> }
>>
>> svn_pool_destroy(iterpool);
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=2356019
>>
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2368818

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2368862
Received on 2009-07-07 16:12:55 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.