[gnome-photos] delete-notification: Use g_auto*



commit 1ca7a56fc4afe425e45b1e1483bfd9b2d9011d87
Author: Umang Jain <mailumangjain gmail com>
Date:   Sun Oct 8 09:14:31 2017 +0530

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

 src/photos-delete-notification.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/photos-delete-notification.c b/src/photos-delete-notification.c
index 85d2a00..e7b6bcc 100644
--- a/src/photos-delete-notification.c
+++ b/src/photos-delete-notification.c
@@ -121,11 +121,11 @@ static void
 photos_delete_notification_constructed (GObject *object)
 {
   PhotosDeleteNotification *self = PHOTOS_DELETE_NOTIFICATION (object);
-  gchar *msg;
   GtkWidget *close;
   GtkWidget *image;
   GtkWidget *label;
   GtkWidget *undo;
+  g_autofree gchar *msg = NULL;
   guint length;
 
   G_OBJECT_CLASS (photos_delete_notification_parent_class)->constructed (object);
@@ -145,7 +145,6 @@ photos_delete_notification_constructed (GObject *object)
   gtk_widget_set_halign (label, GTK_ALIGN_START);
   gtk_widget_set_hexpand (label, TRUE);
   gtk_container_add (GTK_CONTAINER (self), label);
-  g_free (msg);
 
   undo = gtk_button_new_with_label (_("Undo"));
   gtk_widget_set_valign (undo, GTK_ALIGN_CENTER);


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