This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository libx2goclient.

commit 285eeb3dc232745bc775e10fc26dc8f2b5b11588
Author: Mihai Moldovan <io...@ionic.de>
Date:   Fri Jul 31 11:19:53 2020 +0200

    src/x2goclient-network-ssh.c: re-order finalization.
    
    Destruction is a delicate matter and we actually have things depend on
    each other now, so make sure that we get rid of data in the correct
    order, which also means destroying properties last.
---
 src/x2goclient-network-ssh.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/src/x2goclient-network-ssh.c b/src/x2goclient-network-ssh.c
index 6e85e16..e639bd8 100644
--- a/src/x2goclient-network-ssh.c
+++ b/src/x2goclient-network-ssh.c
@@ -212,6 +212,21 @@ static void x2goclient_network_ssh_dispose (GObject * 
const object) {
 static void x2goclient_network_ssh_finalize (GObject * const object) {
   X2GoClientNetworkSSH *self = X2GOCLIENT_NETWORK_SSH (object);
 
+  /*
+   * The order of finalization is pretty important.
+   *
+   * We'll need data such as the session path for termination of the master
+   * connection, so make sure that the dependencies are set up correctly here.
+   */
+
+  if (!(x2goclient_network_ssh_kill_subprocesses (self))) {
+    g_log (NULL, G_LOG_LEVEL_CRITICAL, "Some subprocesses were not terminated 
correctly!");
+  }
+
+  g_free (self->control_path);
+  self->control_path = NULL;
+
+
   /* Properties. */
   if (self->openssh_version) {
     g_boxed_free (X2GOCLIENT_TYPE_OPENSSH_VERSION, self->openssh_version);
@@ -223,14 +238,6 @@ static void x2goclient_network_ssh_finalize (GObject * 
const object) {
     self->openssh_bugs = NULL;
   }
 
-
-  g_free (self->control_path);
-  self->control_path = NULL;
-
-  if (!(x2goclient_network_ssh_kill_subprocesses (self))) {
-    g_log (NULL, G_LOG_LEVEL_CRITICAL, "Some subprocesses were not terminated 
correctly!");
-  }
-
   (G_OBJECT_CLASS (x2goclient_network_ssh_parent_class))->finalize (object);
 }
 

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on 
/srv/git/code.x2go.org/libx2goclient.git
_______________________________________________
x2go-commits mailing list
x2go-commits@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-commits

Reply via email to