[gjs/gnome-3-34] util: Don't free memory we do not own



commit 595beeabeb01122ff565cf03960a8c501a876e20
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Sep 21 23:32:49 2019 +0200

    util: Don't free memory we do not own
    
    gtk_container_class_find_child_property() doesn't transfer ownership
    of the returned  param spec, so we must not free the memory.
    
    https://gitlab.gnome.org/GNOME/gjs/issues/284

 libgjs-private/gjs-util.c | 1 -
 1 file changed, 1 deletion(-)
---
diff --git a/libgjs-private/gjs-util.c b/libgjs-private/gjs-util.c
index 1148cff7..a5b44fec 100644
--- a/libgjs-private/gjs-util.c
+++ b/libgjs-private/gjs-util.c
@@ -306,7 +306,6 @@ void gjs_gtk_container_child_set_property(GObject* container, GObject* child,
     g_value_unset(&value_arg);
 
 out:
-    g_clear_pointer(&pspec, g_param_spec_unref);
     g_clear_pointer(&base_info, g_base_info_unref);
     g_clear_pointer(&child_set_property_fun, g_base_info_unref);
 }


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