diff --git a/ChangeLog b/ChangeLog index 1026e9bbab..246eac78e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-02 Christian Persch + + Bug 554690 – mem leak in filechooser + + * gtk/gtkfilechooserdefault.c: Plug a mem leak. + 2008-10-02 Michael Natterer Bug 553585 – Add orientation API to GtkRuler diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 8881936dc2..1248e7b27f 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -2074,10 +2074,17 @@ shortcuts_add_volumes (GtkFileChooserDefault *impl) if (_gtk_file_system_volume_is_mounted (volume)) { GFile *base_file; + gboolean base_is_native = TRUE; base_file = _gtk_file_system_volume_get_root (volume); - if (base_file != NULL && !g_file_is_native (base_file)) - continue; + if (base_file != NULL) + { + base_is_native = g_file_is_native (base_file); + g_object_unref (base_file); + } + + if (!base_is_native) + continue; } }