summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-03-06 10:07:20 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-03-06 11:26:37 +0000
commit70143dc4a366fd84d2718769f39c1015a3c199ec (patch)
tree5c332f4f593899735a9add1c9587770f3bb1634f /vcl/unx
parente7737fef7f84f065ec94f114761d70fc7f90ed5a (diff)
fix leak: return value of pango_attr_list_get_iterator should be released
"PangoAttrIterator * pango_attr_list_get_iterator (PangoAttrList *list); Returns : the newly allocated PangoAttrIterator, which should be freed with pango_attr_iterator_destroy()."
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index a2e6df851f62..6844a109ab4b 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -3941,7 +3941,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
pThis->m_aInputFlags = std::vector<sal_uInt16>( std::max( 1, (int)pThis->m_aInputEvent.maText.Len() ), 0 );
- PangoAttrIterator *iter = pango_attr_list_get_iterator (pAttrs);
+ PangoAttrIterator *iter = pango_attr_list_get_iterator(pAttrs);
do
{
GSList *attr_list = NULL;
@@ -3996,8 +3996,9 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
pThis->m_aInputFlags[i] |= sal_attr;
}
} while (pango_attr_iterator_next (iter));
+ pango_attr_iterator_destroy(iter);
- pThis->m_aInputEvent.mpTextAttr = &pThis->m_aInputFlags[0];
+ pThis->m_aInputEvent.mpTextAttr = &pThis->m_aInputFlags[0];
g_free( pText );
pango_attr_list_unref( pAttrs );