[Libreoffice-commits] core.git: sfx2/source vcl/unx
Matthew J. Francis
mjay.francis at gmail.com
Thu Sep 25 05:16:38 PDT 2014
sfx2/source/control/thumbnailview.cxx | 3 ++-
vcl/unx/gtk/window/gloactiongroup.cxx | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 456fb845113ac79954027728c5773f4552b33501
Author: Matthew J. Francis <mjay.francis at gmail.com>
Date: Thu Sep 25 18:44:52 2014 +0800
Fix miscellaneous memory leaks
thumbnailview.cxx: ::ImplInitSettings is called from various
places other than the constructor, so mpItemAttrs must be
freed each time
gloactiongroup.cxx: Must call g_list_free on list returned by
g_hash_table_get_keys
Change-Id: Id5a592520987a1596debdbc48bfa171a537e400b
Reviewed-on: https://gerrit.libreoffice.org/11638
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index 9bf3df1..96ae388 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -59,6 +59,7 @@ enum
ThumbnailView::ThumbnailView (vcl::Window *pParent, WinBits nWinStyle, bool bDisableTransientChildren)
: Control( pParent, nWinStyle )
{
+ mpItemAttrs = NULL;
ImplInit();
mbIsTransientChildrenDisabled = bDisableTransientChildren;
}
@@ -215,7 +216,7 @@ void ThumbnailView::ImplInitSettings( bool bFont, bool bForeground, bool bBackgr
SetBackground( aColor );
}
-
+ delete mpItemAttrs;
mpItemAttrs = new ThumbnailItemAttributes;
mpItemAttrs->aFillColor = maColor.getBColor();
mpItemAttrs->aHighlightColor = rStyleSettings.GetHighlightColor().getBColor();
diff --git a/vcl/unx/gtk/window/gloactiongroup.cxx b/vcl/unx/gtk/window/gloactiongroup.cxx
index e6c10b7..60f46cd 100644
--- a/vcl/unx/gtk/window/gloactiongroup.cxx
+++ b/vcl/unx/gtk/window/gloactiongroup.cxx
@@ -430,6 +430,8 @@ g_lo_action_group_clear (GLOActionGroup *group)
{
g_lo_action_group_remove (group, (gchar*) element->data);
}
+
+ g_list_free (keys);
}
#endif
More information about the Libreoffice-commits
mailing list