[gnome-photos] searchbar: Use g_auto*



commit ea1c92604778d2f30118fb515c90ef9a639852ed
Author: Umang Jain <mailumangjain gmail com>
Date:   Tue Dec 5 12:33:13 2017 +0530

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

 src/photos-searchbar.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/photos-searchbar.c b/src/photos-searchbar.c
index 51f0dafc..0b12619e 100644
--- a/src/photos-searchbar.c
+++ b/src/photos-searchbar.c
@@ -114,7 +114,7 @@ static void
 photos_searchbar_update_visibility (PhotosSearchbar *self)
 {
   PhotosSearchbarPrivate *priv;
-  GVariant *state = NULL;
+  g_autoptr (GVariant) state = NULL;
 
   priv = photos_searchbar_get_instance_private (self);
 
@@ -125,8 +125,6 @@ photos_searchbar_update_visibility (PhotosSearchbar *self)
     photos_searchbar_show (self);
   else
     photos_searchbar_hide (self);
-
-  g_variant_unref (state);
 }
 
 


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