[gtk+/gtk-3-10] Fix a small memory leak
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-10] Fix a small memory leak
- Date: Sun, 6 Apr 2014 03:41:52 +0000 (UTC)
commit e881f553c2ab1917b2856ab8642b23151e8d570e
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Feb 19 00:31:40 2014 -0500
Fix a small memory leak
GtkPrintUnixDialog was leaking a GFile.
Spotted by Christian Persch in
https://bugzilla.gnome.org/show_bug.cgi?id=724631
gtk/gtkprintunixdialog.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index 94fdec0..22a8503 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -668,10 +668,14 @@ error_dialogs (GtkPrintUnixDialog *print_dialog,
if (file != NULL &&
g_file_query_exists (file, NULL))
{
+ GFile *parent;
+
toplevel = get_toplevel (GTK_WIDGET (print_dialog));
basename = g_file_get_basename (file);
- dirname = g_file_get_parse_name (g_file_get_parent (file));
+ parent = g_file_get_parent (file);
+ dirname = g_file_get_parse_name (parent);
+ g_object_unref (parent);
dialog = gtk_message_dialog_new (toplevel,
GTK_DIALOG_MODAL |
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]