svx/source/table/tablecolumn.cxx |    4 ++++
 svx/source/table/tablerow.cxx    |    4 ++++
 2 files changed, 8 insertions(+)

New commits:
commit b7075e97a4323671fccfd581a9606b1f1ed4b103
Author: Takeshi Abe <t...@fixedpoint.jp>
Date:   Mon Jun 30 18:17:06 2014 +0900

    Do not leave unreachable TableColumnUndo/TableRowUndo in case of exceptions
    
    ... which might be a memory leak otherwise.
    
    Change-Id: I5e911ba815c3df519365236043fccc7ff21c60b4
    Reviewed-on: https://gerrit.libreoffice.org/9979
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/svx/source/table/tablecolumn.cxx b/svx/source/table/tablecolumn.cxx
index 2909f3e..1b0aa17 100644
--- a/svx/source/table/tablecolumn.cxx
+++ b/svx/source/table/tablecolumn.cxx
@@ -209,10 +209,14 @@ void SAL_CALL TableColumn::setFastPropertyValue( 
sal_Int32 nHandle, const Any& a
             break;
         }
     default:
+        delete pUndo;
         throw UnknownPropertyException();
     }
     if( !bOk )
+    {
+        delete pUndo;
         throw IllegalArgumentException();
+    }
 
     if( bChange )
     {
diff --git a/svx/source/table/tablerow.cxx b/svx/source/table/tablerow.cxx
index c213e49..d7449ba 100644
--- a/svx/source/table/tablerow.cxx
+++ b/svx/source/table/tablerow.cxx
@@ -283,10 +283,14 @@ void SAL_CALL TableRow::setFastPropertyValue( sal_Int32 
nHandle, const Any& aVal
             break;
         }
     default:
+        delete pUndo;
         throw UnknownPropertyException();
     }
     if( !bOk )
+    {
+        delete pUndo;
         throw IllegalArgumentException();
+    }
 
     if( bChange )
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to