[Libreoffice-commits] core.git: 2 commits - basic/qa o3tl/qa

Chris Sherlock chris.sherlock79 at gmail.com
Thu May 1 07:19:56 PDT 2014


 basic/qa/cppunit/basictest.hxx |    2 ++
 o3tl/qa/test-sorted_vector.cxx |    4 ++++
 2 files changed, 6 insertions(+)

New commits:
commit f0bfee74d479f39d500d19c48380d88bdb3ad93d
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Thu May 1 23:49:05 2014 +1000

    coverity#1209778 & coverity#1209777 Resource leak
    
    Have testBasics_FindPtr() cleanup after itself by deleting p2 and p4.
    
    Change-Id: I88b5efd25941d135b743f759a8f27c1cdbcb43c0

diff --git a/o3tl/qa/test-sorted_vector.cxx b/o3tl/qa/test-sorted_vector.cxx
index e380355..059c1ba 100644
--- a/o3tl/qa/test-sorted_vector.cxx
+++ b/o3tl/qa/test-sorted_vector.cxx
@@ -193,6 +193,8 @@ public:
         CPPUNIT_ASSERT( aVec.size() == 3 );
 
         aVec.DeleteAndDestroyAll();
+        delete p2;
+        delete p4;
     }
 
     void testErase_FindPtr()
commit 8bf0b9536cb33dfcce8a811b70c2ead285300f3f
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Thu May 1 23:42:49 2014 +1000

    coverity#1209779 & coverity#1209780 Resource leak
    
    Have the testBasics() function clean up after itself - delete p2 and
    p4 at the end of the function.
    
    Change-Id: Ib0c732e1962da94fde0e0da307f610dd36f49eda

diff --git a/basic/qa/cppunit/basictest.hxx b/basic/qa/cppunit/basictest.hxx
index 3cf5669..369f0df 100644
--- a/basic/qa/cppunit/basictest.hxx
+++ b/basic/qa/cppunit/basictest.hxx
@@ -78,6 +78,8 @@ class MacroSnippet
                         sSource = sCode;
                     }
                 }
+
+                free(buffer);
             }
         }
         CPPUNIT_ASSERT_MESSAGE( "Source is empty", ( sSource.getLength() > 0 ) );
diff --git a/o3tl/qa/test-sorted_vector.cxx b/o3tl/qa/test-sorted_vector.cxx
index 5f068d9..e380355 100644
--- a/o3tl/qa/test-sorted_vector.cxx
+++ b/o3tl/qa/test-sorted_vector.cxx
@@ -68,6 +68,8 @@ public:
         CPPUNIT_ASSERT( aVec.erase(p2) == 0 );
 
         aVec.DeleteAndDestroyAll();
+        delete p2;
+        delete p4;
     }
 
     void testErase()


More information about the Libreoffice-commits mailing list