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

[TSVN] conflicting malloc - delete pairs in tortoisesvn

From: Jani Averbach <jaa_at_jaa.iki.fi>
Date: 2004-07-11 03:49:46 CEST

Hello,

One person in our organisation, who is very happily using TortoiseSVN,
found with BoundChecker that there are conflicting malloc - delete pairs
in TSVN and he had to uninstall TortoiseSVN so he could debug his own
program.

I did a quick skimming through the code, and found one possible place
where this could happen.

SVNFolderStatus.cpp:

     27 const char* StringPool::GetString (const char* value)
     ...
     48 const char* newString = strdup (value);
     49 if (newString)
     50 {
     51 pool.insert (newString);
     ...

     63 void StringPool::clear()
     ...
     67 for (pool_type::iterator iter = pool.begin(), end = pool.end(); iter != end; ++iter)
     68 {
     69 delete *iter;
     70 }

man strdup:
       ... Memory for the new string is obtained with malloc(3) ...

BR, Jani

-- 
Jani Averbach
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Sun Jul 11 11:48:50 2004

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.