[gtk-vnc] Fix a memory leak by freeing the private null cursor
- From: Jonh Wendell <jwendell src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk-vnc] Fix a memory leak by freeing the private null cursor
- Date: Wed, 28 Oct 2009 23:33:00 +0000 (UTC)
commit a19afa45147b9e8d431ebc66668423b64b9fbf3f
Author: Jonh Wendell <jwendell gnome org>
Date: Wed Oct 28 19:29:15 2009 -0300
Fix a memory leak by freeing the private null cursor
src/vncdisplay.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/vncdisplay.c b/src/vncdisplay.c
index dc328ed..d20e695 100644
--- a/src/vncdisplay.c
+++ b/src/vncdisplay.c
@@ -986,7 +986,8 @@ static gboolean do_resize(void *opaque, int width, int height, gboolean quiet)
}
if (priv->gc == NULL) {
- priv->null_cursor = create_null_cursor();
+ if (!priv->null_cursor)
+ priv->null_cursor = create_null_cursor();
if (priv->local_pointer)
do_pointer_show(obj);
else if (priv->in_pointer_grab || priv->absolute)
@@ -1621,6 +1622,11 @@ static void vnc_display_finalize (GObject *obj)
priv->image = NULL;
}
+ if (priv->null_cursor) {
+ gdk_cursor_unref (priv->null_cursor);
+ priv->null_cursor = NULL;
+ }
+
g_free (priv->host);
g_free (priv->port);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]