[vte] pty: Fix some leaks



commit 906f3b65ddb638417093a337d3e5f952adf4df2b
Author: Christian Persch <chpe gnome org>
Date:   Sun Jan 8 13:39:24 2017 +0100

    pty: Fix some leaks
    
    Async spawning was leaking the VtePty ref, and the closure data.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=777007

 src/pty.cc |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/pty.cc b/src/pty.cc
index 5fd1f16..0916dd9 100644
--- a/src/pty.cc
+++ b/src/pty.cc
@@ -1055,6 +1055,9 @@ async_spawn_data_free(gpointer data_)
         g_strfreev(data->m_envv);
         if (data->m_child_setup_data && data->m_child_setup_data_destroy)
                 data->m_child_setup_data_destroy(data->m_child_setup_data);
+        g_object_unref(data->m_pty);
+
+        g_free(data);
 }
 
 static void


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