diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-02-19 00:31:40 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-02-19 00:31:40 -0500 |
commit | 7fbf6a67a2204a6c891fed251811c6d60b9e6746 (patch) | |
tree | 4c8164d0bd843e777590040939aa5186c34775bb /gtk/gtkprintunixdialog.c | |
parent | 63bb834b2e621db11d86d29a3f084e8cb9938f18 (diff) | |
download | gtk+-7fbf6a67a2204a6c891fed251811c6d60b9e6746.tar.gz |
Fix a small memory leak
GtkPrintUnixDialog was leaking a GFile.
Spotted by Christian Persch in
https://bugzilla.gnome.org/show_bug.cgi?id=724631
Diffstat (limited to 'gtk/gtkprintunixdialog.c')
-rw-r--r-- | gtk/gtkprintunixdialog.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c index 170f36883c..f846a18a06 100644 --- a/gtk/gtkprintunixdialog.c +++ b/gtk/gtkprintunixdialog.c @@ -641,10 +641,14 @@ error_dialogs (GtkPrintUnixDialog *print_dialog, if (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 | |