[MOAB-dev] r1646 - MOAB/trunk

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Wed Mar 12 17:13:32 CDT 2008


Author: kraftche
Date: 2008-03-12 17:13:32 -0500 (Wed, 12 Mar 2008)
New Revision: 1646

Modified:
   MOAB/trunk/SequenceData.cpp
Log:
Fix memory corruption releasing tag storage when MBCore is cleared/destroyed.


Modified: MOAB/trunk/SequenceData.cpp
===================================================================
--- MOAB/trunk/SequenceData.cpp	2008-03-12 19:50:23 UTC (rev 1645)
+++ MOAB/trunk/SequenceData.cpp	2008-03-12 22:13:32 UTC (rev 1646)
@@ -154,8 +154,8 @@
 void SequenceData::release_tag_data( const int* tag_sizes, int num_tag_sizes )
 {
   assert( num_tag_sizes >= (int)numTagData );
-  for (unsigned i = 1; i <= numTagData; ++i)
-    release_tag_data( i, tag_sizes[i-1] );
+  for (unsigned i = 0; i < numTagData; ++i)
+    release_tag_data( i, tag_sizes[i] );
 }
 
 void SequenceData::release_tag_data( MBTagId tag_num, int tag_size )




More information about the moab-dev mailing list