[PATCH] Change in core[libreoffice-4-0]: Let's not return here to prevent memory leak.

Kohei Yoshida (via Code Review) gerrit at gerrit.libreoffice.org
Fri Jan 11 09:59:44 PST 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1653

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/53/1653/1

Let's not return here to prevent memory leak.

There are several heap objects that are deleted at the end of the
method.  Returning prematurely would leak those objects.

Change-Id: If70cb3c9c02e47229d10b30f1542f7b25534d593
---
M sc/source/ui/docshell/dbdocfun.cxx
1 file changed, 1 insertion(+), 2 deletions(-)



diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 3b1db2f..9f4d58d 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -1319,8 +1319,7 @@
             if ( pDestObj )
             {
                 pDestObj->ReloadGroupTableData();
-                if (!pDestObj->SyncAllDimensionMembers())
-                    return false;
+                pDestObj->SyncAllDimensionMembers();
                 pDestObj->InvalidateData();             // before getting the new output area
 
                 //  make sure the table has a name (not set by dialog)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If70cb3c9c02e47229d10b30f1542f7b25534d593
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Kohei Yoshida <kohei.yoshida at gmail.com>



More information about the LibreOffice mailing list