[gnome-settings-daemon/gnome-3-4] wacom: Fix memleak in filter_events()



commit 3b9a740c9eb7a473bdacd1d3db6f4fc30eaf1808
Author: Bastien Nocera <hadess hadess net>
Date:   Fri May 25 13:24:11 2012 +0100

    wacom: Fix memleak in filter_events()

 plugins/wacom/gsd-wacom-device.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index 95e5c6c..be23a66 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -373,6 +373,8 @@ filter_events (XEvent         *xevent,
 	name = XGetAtomName (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), pev->property);
 	if (name == NULL ||
 	    g_strcmp0 (name, WACOM_SERIAL_IDS_PROP) != 0) {
+		if (name)
+			XFree (name);
 		return GDK_FILTER_CONTINUE;
 	}
 	XFree (name);



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