diff options
author | Matthew J. Francis <mjay.francis@gmail.com> | 2014-09-25 18:44:52 +0800 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-09-25 12:16:06 +0000 |
commit | 456fb845113ac79954027728c5773f4552b33501 (patch) | |
tree | 968c65981b944af08134c51f705e78b9c1fe65f5 /sfx2 | |
parent | d7fdf70c4433a41debb4729607df081f15b4ed54 (diff) |
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@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/thumbnailview.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 9bf3df12864f..96ae388e3df3 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(); |