[vte] widget: Fix refcount leak in child_watch_done



commit 167f6607a779c9b57c0f856df244aa83aa8f2651
Author: Eric R. Schulz <eric ers35 com>
Date:   Wed Aug 17 16:12:42 2016 +0200

    widget: Fix refcount leak in child_watch_done
    
    VteTerminalPrivate::child_watch_done() was missing the g_object_unref()
    corresponding to its g_object_ref() at the start.
    
    Since this function is only called from the callback of
    g_child_watch_add_full(), and that callback already uses g_object_ref()/
    g_object_unref() around the call to VteTerminalPrivate::child_watch_done
    to keep the VteTerminalPrivate in a death grip, just remove the extra
    g_object_ref().
    
    The bug was introduced in commit 50aee40af7d16c2bec82f4f8bcdd259b6913c541.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=770036

 src/vte.cc |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index d77d162..609d4e2 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -3130,7 +3130,6 @@ VteTerminalPrivate::child_watch_done(GPid pid,
                 return;
 
         GObject *object = G_OBJECT(m_terminal);
-        g_object_ref(object);
         g_object_freeze_notify(object);
 
         _VTE_DEBUG_IF (VTE_DEBUG_LIFECYCLE) {


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