tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gw...@apache.org
Subject svn commit: r509519 - in /incubator/tuscany/cpp/sdo/runtime/core: src/commonj/sdo/DataObjectListImpl.cpp src/commonj/sdo/SDOSAX2Parser.cpp src/commonj/sdo/XSDHelperImpl.cpp test/sdotest2.cpp
Date Tue, 20 Feb 2007 11:47:31 GMT
Author: gwinn
Date: Tue Feb 20 03:47:30 2007
New Revision: 509519

URL: http://svn.apache.org/viewvc?view=rev&rev=509519
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/XSDHelperImpl.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=509519&r1=509518&r2=509519
==============================================================================
--- 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 03:47:30 2007
@@ -363,7 +363,7 @@
     delete[] typeName;
     typeName = new char[strlen(name)+1];
     strcpy(typeName, name);
-    delete typeURI;
+    delete[] typeURI;
     if (uri == 0) 
     {
         typeURI = new char[1];

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=509519&r1=509518&r2=509519
==============================================================================
--- 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 03:47:30
2007
@@ -1410,7 +1410,7 @@
                                     strcpy(combi,s);
                                     strcat(combi,str);
                                     seq->setText(k,(const char*)combi);
-                                    delete combi;
+                                    delete[] combi;
                                 }
                                 else
                                 {

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.cpp?view=diff&rev=509519&r1=509518&r2=509519
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/XSDHelperImpl.cpp Tue Feb 20 03:47:30
2007
@@ -648,7 +648,7 @@
             {
                 if (*parseErrors.begin() != 0)
                 {
-                    delete (char*)(*parseErrors.begin());
+                    delete[] (char*)(*parseErrors.begin());
                 }
                 parseErrors.erase(parseErrors.begin());
             }

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=509519&r1=509518&r2=509519
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/test/sdotest2.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/test/sdotest2.cpp Tue Feb 20 03:47:30 2007
@@ -644,8 +644,8 @@
         if (f2 == 0)
         {
             if (!silent)cout << "Unable to open " << name2 << endl;
-            delete name2;
-            delete name4;
+            delete[] name2;
+            delete[] name4;
             return 0;
         }
 
@@ -662,8 +662,8 @@
                     if (!strcmp(acceptedxmlerror,xmh->getErrorMessage(j)))
                     {
                         fclose(f2);
-                        delete name2;
-                        delete name4;
+                        delete[] name2;
+                        delete[] name4;
                         return 1;
                     }
                 }
@@ -679,8 +679,8 @@
                 }
             }
             fclose(f2);
-            delete name2;
-            delete name4;
+            delete[] name2;
+            delete[] name4;
             return 0;
         }
 
@@ -712,8 +712,8 @@
 
             rc = comparefiles(name2,name4);
 
-            delete name2;
-            delete name4;
+            delete[] name2;
+            delete[] name4;
 
             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