[X2Go-Commits] [libx2goclient] 04/04: src/x2goclient-network.c: don't call g_string_free () on NULL pointers.

git-admin at x2go.org git-admin at x2go.org
Sat Jan 18 13:21:23 CET 2020


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

x2go pushed a commit to branch master
in repository libx2goclient.

commit bc07aef1d8372832ecb496f401a130f7403d2eb1
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sat Jan 18 13:20:43 2020 +0100

    src/x2goclient-network.c: don't call g_string_free () on NULL pointers.
---
 src/x2goclient-network.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/x2goclient-network.c b/src/x2goclient-network.c
index 9d0ce6b..667e99a 100644
--- a/src/x2goclient-network.c
+++ b/src/x2goclient-network.c
@@ -144,8 +144,10 @@ static void x2goclient_network_dispose (GObject *object) {
 static void x2goclient_network_finalize (GObject *object) {
   X2GoClientNetworkPrivate *priv = x2goclient_network_get_instance_private (X2GOCLIENT_NETWORK (object));
 
-  g_string_free (priv->socket_spec, TRUE);
-  priv->socket_spec = NULL;
+  if (priv->socket_spec) {
+    g_string_free (priv->socket_spec, TRUE);
+    priv->socket_spec = NULL;
+  }
   g_free (priv->session_path);
   priv->session_path = NULL;
 

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git


More information about the x2go-commits mailing list