[gjs] object: Zero out new ConnectData



commit 9eb4a2ba13164f3ac594ba207127fc66dd93aa92
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 b433956..e29df47 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -1636,7 +1636,7 @@ real_connect_func(JSContext *context,
     if (closure == NULL)
         return false;
 
-    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]