[gnome-photos] header-bar: Use g_auto*



commit 3d0e4796e86f6e2b3babd7f61971de0e51108fbb
Author: Umang Jain <mailumangjain gmail com>
Date:   Mon Dec 4 17:24:48 2017 +0530

    header-bar: Use g_auto*
    
    https://bugzilla.gnome.org/show_bug.cgi?id=788174

 src/photos-header-bar.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/photos-header-bar.c b/src/photos-header-bar.c
index 8d666608..e7c58faf 100644
--- a/src/photos-header-bar.c
+++ b/src/photos-header-bar.c
@@ -99,7 +99,7 @@ photos_header_bar_new (void)
 void
 photos_header_bar_clear (PhotosHeaderBar *self)
 {
-  GList *children;
+  g_autoptr (GList) children = NULL;
   GList *l;
 
   self->mode = PHOTOS_HEADER_BAR_MODE_NONE;
@@ -108,8 +108,6 @@ photos_header_bar_clear (PhotosHeaderBar *self)
   children = gtk_container_get_children (GTK_CONTAINER (self));
   for (l = children; l != NULL; l = l->next)
     gtk_widget_destroy (GTK_WIDGET (l->data));
-
-  g_list_free (children);
 }
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]