[PATCH 4/6] Fix a memory leak by freeing a GdkGC private variable



---
 src/vncdisplay.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/vncdisplay.c b/src/vncdisplay.c
index d900943..15c80ae 100644
--- a/src/vncdisplay.c
+++ b/src/vncdisplay.c
@@ -1633,6 +1633,11 @@ static void vnc_display_finalize (GObject *obj)
 		priv->null_cursor = NULL;
 	}
 
+	if (priv->gc) {
+		g_object_unref (priv->gc);
+		priv->gc = NULL;
+	}
+
 	g_free (priv->host);
 	g_free (priv->port);
 
-- 
1.6.3.3


--=-ZGLsREbMdlUqAwJTGqis
Content-Disposition: attachment; filename="0005-Fix-a-memory-leak-by-freeing-the-remote-cursor.patch"
Content-Type: text/x-patch; name="0005-Fix-a-memory-leak-by-freeing-the-remote-cursor.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit



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