[PATCH 5/6] Fix a memory leak by freeing the remote cursor



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

diff --git a/src/vncdisplay.c b/src/vncdisplay.c
index 15c80ae..0b63220 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->remote_cursor) {
+		gdk_cursor_unref(priv->remote_cursor);
+		priv->remote_cursor = NULL;
+	}
+
 	if (priv->gc) {
 		g_object_unref (priv->gc);
 		priv->gc = NULL;
-- 
1.6.3.3


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



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