[PATCH] coverity#704143: Resource leak in object

Julien Nabet (via Code Review) gerrit at gerrit.libreoffice.org
Tue Mar 12 11:56:57 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2686

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/86/2686/1

coverity#704143: Resource leak in object

Change-Id: I6bf9fc6e65de857d4d05df0c7be64dc6ec38dc07
---
M extensions/source/abpilot/datasourcehandling.cxx
M extensions/source/abpilot/datasourcehandling.hxx
2 files changed, 5 insertions(+), 0 deletions(-)



diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx
index 16bb8e3..ca82fb9 100644
--- a/extensions/source/abpilot/datasourcehandling.cxx
+++ b/extensions/source/abpilot/datasourcehandling.cxx
@@ -209,6 +209,10 @@
             OSL_FAIL( "ODataSourceContext::ODataSourceContext: caught an exception!" );
         }
     }
+    ODataSourceContext::~ODataSourceContext()
+    {
+        delete(m_pImpl);
+    }
 
     //---------------------------------------------------------------------
     ::rtl::OUString& ODataSourceContext::disambiguate(::rtl::OUString& _rDataSourceName)
diff --git a/extensions/source/abpilot/datasourcehandling.hxx b/extensions/source/abpilot/datasourcehandling.hxx
index 7804f1b..3a2dab8 100644
--- a/extensions/source/abpilot/datasourcehandling.hxx
+++ b/extensions/source/abpilot/datasourcehandling.hxx
@@ -56,6 +56,7 @@
         ODataSourceContext(
             const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
         );
+        ~ODataSourceContext();
 
         /// retrieves the names of all data sources
         void    getDataSourceNames( StringBag& _rNames ) const SAL_THROW (( ));

-- 
To view, visit https://gerrit.libreoffice.org/2686
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6bf9fc6e65de857d4d05df0c7be64dc6ec38dc07
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Julien Nabet <serval2412 at yahoo.fr>



More information about the LibreOffice mailing list