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

Re: svn commit: r1078918 - /subversion/trunk/subversion/libsvn_wc/wc_db.c

From: Hyrum K Wright <hyrum_at_hyrumwright.org>
Date: Mon, 7 Mar 2011 14:40:51 -0600

On Mon, Mar 7, 2011 at 2:37 PM, Greg Stein <gstein_at_gmail.com> wrote:
> On Mon, Mar 7, 2011 at 15:13,  <hwright_at_apache.org> wrote:
>> Author: hwright
>> Date: Mon Mar  7 20:13:29 2011
>> New Revision: 1078918
>>
>> URL: http://svn.apache.org/viewvc?rev=1078918&view=rev
>> Log:
>> Add an iterpool to a loop in wc-ng.
>>
>> * subversion/libsvn_wc/wc_db.c
>>  (svn_wc__db_temp_forget_directory): Add iterpool.
>>
>> Modified:
>>    subversion/trunk/subversion/libsvn_wc/wc_db.c
>>
>> Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
>> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1078918&r1=1078917&r2=1078918&view=diff
>> ==============================================================================
>> --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
>> +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Mon Mar  7 20:13:29 2011
>> @@ -7352,6 +7352,7 @@ svn_wc__db_temp_forget_directory(svn_wc_
>>  {
>>   apr_hash_t *roots = apr_hash_make(scratch_pool);
>>   apr_hash_index_t *hi;
>> +  apr_pool_t *iterpool = svn_pool_create(scratch_pool);
>>
>>   for (hi = apr_hash_first(scratch_pool, db->dir_data);
>>        hi;
>> @@ -7364,7 +7365,9 @@ svn_wc__db_temp_forget_directory(svn_wc_
>>       if (!svn_dirent_is_ancestor(local_dir_abspath, local_abspath))
>>         continue;
>>
>> -      err = svn_wc__db_wclock_release(db, local_abspath, scratch_pool);
>> +      svn_pool_clear(iterpool);
>> +
>> +      err = svn_wc__db_wclock_release(db, local_abspath, iterpool);
>>       if (err
>>           && (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY
>>               || err->apr_err == SVN_ERR_WC_NOT_LOCKED))
>>
>
> Where's the destroy?

Well, since it's allocated in the scratch_pool, the caller will
destroy it, right? :P

r1078934.

-Hyrum
Received on 2011-03-07 21:41:26 CET

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.