summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2013-06-04 22:00:45 +0200
committerCaolán McNamara <caolanm@redhat.com>2013-06-05 10:04:43 +0000
commit4450d6bbd10fbf57f18912095f58c4a79b20bcb7 (patch)
tree95e7e554a95bc8554926ef27c0323795a287af09
parenta9e0ec2b87a99c93b77a210a916b4df44ece454a (diff)
Fix memory leak in SalGtkFilePicker::SalGtkFilePicker.
The result of gtk_widget_create_pango_layout should be unrefed when done. Change-Id: I46c220a933a2dac42ec21e9e2904938bc4649dbd Reviewed-on: https://gerrit.libreoffice.org/4157 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 88cb3de954b5..50ec20c9dca7 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -301,6 +301,8 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext
PangoRectangle row_height;
pango_layout_set_markup (layout, "All Files", -1);
pango_layout_get_pixel_extents (layout, NULL, &row_height);
+ g_object_unref (layout);
+
g_object_get (cell, "ypad", &ypad, (char *)NULL);
guint height = (row_height.height + 2*ypad) * 5;
gtk_widget_set_size_request (m_pFilterView, -1, height);