[gjs/gnome-3-24] object: Zero out new ConnectData



commit 32c5320052d5c6eaeee400ce874e8ee7a06d9d05
Author: Philip Chimento <philip endlessm com>
Date:   Mon Jun 19 16:15:16 2017 -0700

    object: Zero out new ConnectData
    
    The idle_invalidate_id member was being filled with garbage, leading to
    errors later where nonexisting (or worse, existing) source IDs were being
    removed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783951

 gi/object.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gi/object.cpp b/gi/object.cpp
index 5996c7f..0cce454 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -1828,7 +1828,7 @@ real_connect_func(JSContext *context,
     if (closure == NULL)
         goto out;
 
-    connect_data = g_slice_new(ConnectData);
+    connect_data = g_slice_new0(ConnectData);
     priv->signals.insert(connect_data);
     connect_data->obj = priv;
     /* This is a weak reference, and will be cleared when the closure is invalidated */


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