From: Morten Welinder Date: Wed, 17 Mar 2004 21:52:29 +0000 (+0000) Subject: Free volumes not actually put into the shortcut list. X-Git-Url: http://pileus.org/git/?p=~andy%2Fgtk;a=commitdiff_plain;h=72d48463da46cb7abfeceb86289109c4b77ae1cd Free volumes not actually put into the shortcut list. 2004-03-17 Morten Welinder * gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Free volumes not actually put into the shortcut list. --- diff --git a/ChangeLog b/ChangeLog index 290bf4a71..5af0fb14f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-03-17 Morten Welinder + * gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Free + volumes not actually put into the shortcut list. + * tests/prop-editor.c (object_changed): Plug leak. * tests/testfilechooser.c (main): Plug some leaks and expose diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 290bf4a71..5af0fb14f 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,8 @@ 2004-03-17 Morten Welinder + * gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Free + volumes not actually put into the shortcut list. + * tests/prop-editor.c (object_changed): Plug leak. * tests/testfilechooser.c (main): Plug some leaks and expose diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 290bf4a71..5af0fb14f 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,5 +1,8 @@ 2004-03-17 Morten Welinder + * gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Free + volumes not actually put into the shortcut list. + * tests/prop-editor.c (object_changed): Plug leak. * tests/testfilechooser.c (main): Plug some leaks and expose diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 290bf4a71..5af0fb14f 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,5 +1,8 @@ 2004-03-17 Morten Welinder + * gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Free + volumes not actually put into the shortcut list. + * tests/prop-editor.c (object_changed): Plug leak. * tests/testfilechooser.c (main): Plug some leaks and expose diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 290bf4a71..5af0fb14f 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,8 @@ 2004-03-17 Morten Welinder + * gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Free + volumes not actually put into the shortcut list. + * tests/prop-editor.c (object_changed): Plug leak. * tests/testfilechooser.c (main): Plug some leaks and expose diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 39cda5688..898729766 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -1224,11 +1224,16 @@ shortcuts_add_volumes (GtkFileChooserDefault *impl) gtk_file_path_free (base_path); if (!is_local) - continue; + { + gtk_file_system_volume_free (impl->file_system, volume); + continue; + } } - shortcuts_insert_path (impl, start_row + n, TRUE, volume, NULL, NULL, FALSE, NULL); - n++; + if (shortcuts_insert_path (impl, start_row + n, TRUE, volume, NULL, NULL, FALSE, NULL)) + n++; + else + gtk_file_system_volume_free (impl->file_system, volume); } impl->num_volumes = n;