[nautilus/wip/antoniof/template-leaks: 6/6] toolbar: Don't leak builder object




commit 39e41cc904a0336e717c9f1f3138e458d1b17207
Author: António Fernandes <antoniof gnome org>
Date:   Sat Dec 19 17:12:18 2020 +0000

    toolbar: Don't leak builder object
    
    Leak found in valgrind file provided by nekohayo

 src/nautilus-toolbar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c
index a64518d8e..89ebac72f 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -892,7 +892,7 @@ on_location_entry_focus_changed (GObject    *object,
 static void
 nautilus_toolbar_constructed (GObject *object)
 {
-    GtkBuilder *builder;
+    g_autoptr (GtkBuilder) builder = NULL;
     NautilusToolbar *self = NAUTILUS_TOOLBAR (object);
 
     builder = gtk_builder_new_from_resource ("/org/gnome/nautilus/ui/nautilus-toolbar-switcher.ui");


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