[bijiben/wip/sadiq/modernize: 4/6] import-dialog: Use g_auto*



commit b8cf931cd1e864c37d400f3ab005b805c80d897c
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Fri Jan 5 08:07:11 2018 +0530

    import-dialog: Use g_auto*
    
    https://bugzilla.gnome.org/show_bug.cgi?id=792221

 src/bjb-import-dialog.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/bjb-import-dialog.c b/src/bjb-import-dialog.c
index 74f4d41..4be6827 100644
--- a/src/bjb-import-dialog.c
+++ b/src/bjb-import-dialog.c
@@ -127,7 +127,7 @@ on_file_set_cb (GtkWidget       *chooser,
 static void
 bjb_import_dialog_constructed (GObject *obj)
 {
-  gchar *path;
+  g_autofree gchar *path = NULL;
   BjbImportDialog *self = BJB_IMPORT_DIALOG (obj);
 
   G_OBJECT_CLASS(bjb_import_dialog_parent_class)->constructed(obj);
@@ -147,8 +147,6 @@ bjb_import_dialog_constructed (GObject *obj)
 
   if (g_file_test (path, G_FILE_TEST_EXISTS))
     gtk_widget_show (self->gnote_import);
-
-  g_free (path);
 }
 
 static void


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