tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gw...@apache.org
Subject svn commit: r509497 - in /incubator/tuscany/cpp/sdo/runtime/core: src/commonj/sdo/DataObjectListImpl.cpp src/commonj/sdo/SDOSAX2Parser.cpp src/commonj/sdo/SDOSchemaSAX2Parser.cpp src/commonj/sdo/TypeImpl.cpp test/sdotest2.cpp
Date Tue, 20 Feb 2007 10:28:32 GMT
Author: gwinn
Date: Tue Feb 20 02:28:31 2007
New Revision: 509497

URL: http://svn.apache.org/viewvc?view=rev&rev=509497
Log:
Fixes identified by valgrind.

Modified:
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSAX2Parser.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/TypeImpl.cpp
    incubator/tuscany/cpp/sdo/runtime/core/test/sdotest2.cpp

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.cpp?view=diff&rev=509497&r1=509496&r2=509497
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectListImpl.cpp Tue Feb
20 02:28:31 2007
@@ -360,7 +360,7 @@
     // need to modify the instance property of the container
     container->setInstancePropertyType(pindex,t);
 
-    delete typeName;
+    delete[] typeName;
     typeName = new char[strlen(name)+1];
     strcpy(typeName, name);
     delete typeURI;

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSAX2Parser.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSAX2Parser.cpp?view=diff&rev=509497&r1=509496&r2=509497
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSAX2Parser.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSAX2Parser.cpp Tue Feb 20 02:28:31
2007
@@ -1370,7 +1370,7 @@
                    start_point = end_point + 1;
                 } while(1);
 
-                delete buf;
+                delete[] buf;
                 return;
             }
 

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp?view=diff&rev=509497&r1=509496&r2=509497
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp Tue Feb
20 02:28:31 2007
@@ -173,7 +173,7 @@
                     sprintf(msg,"Use of undefined group %s",
                                             (const char*)name);
                     setter->setError( msg );
-                    delete msg;
+                    delete[] msg;
                 }
             }
          }

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/TypeImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/TypeImpl.cpp?view=diff&rev=509497&r1=509496&r2=509497
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/TypeImpl.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/TypeImpl.cpp Tue Feb 20 02:28:31
2007
@@ -207,8 +207,15 @@
              }
              count++;
          }
-         if (name != 0)delete name;
-         if (typeURI != 0) delete typeURI;
+         if (name != 0)
+         {
+            delete[] name;
+         }
+         
+         if (typeURI != 0)
+         {
+            delete[] typeURI;
+         }
          for (unsigned int j = 0; j < aliases.size();j++)
          {
              delete aliases[j];

Modified: incubator/tuscany/cpp/sdo/runtime/core/test/sdotest2.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/test/sdotest2.cpp?view=diff&rev=509497&r1=509496&r2=509497
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/test/sdotest2.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/test/sdotest2.cpp Tue Feb 20 02:28:31 2007
@@ -559,8 +559,8 @@
             if (f1 == 0)
             {
                 if (!silent)cout << "Unable to open " << name1 << endl;
-                delete name1;
-                delete name3;
+                delete[] name1;
+                delete[] name3;
                 return 0;
             }
 
@@ -575,8 +575,8 @@
                         if (!strcmp(acceptedxsderror,xsh->getErrorMessage(j)))
                         {
                             fclose(f1);
-                            delete name1;
-                            delete name3;
+                            delete[] name1;
+                            delete[] name3;
                             return 1;
                         }
                     }
@@ -592,8 +592,8 @@
                     }
                 }
                 fclose(f1);
-                delete name1;
-                delete name3;
+                delete[] name1;
+                delete[] name3;
                 return 0;
             }
 
@@ -622,8 +622,8 @@
 
             rc = comparefiles(name1,name3);
             
-            delete name1;
-            delete name3;
+            delete[] name1;
+            delete[] name3;
             
             if (rc == 0)return rc;
     



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message