[gnome-settings-daemon/gnome-3-4] wacom: Fix memleak in get_device_type()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/gnome-3-4] wacom: Fix memleak in get_device_type()
- Date: Fri, 25 May 2012 13:02:44 +0000 (UTC)
commit e96aa47e67e79e6afda5d9c342724de0036c8c31
Author: Bastien Nocera <hadess hadess net>
Date: Fri May 25 13:21:48 2012 +0100
wacom: Fix memleak in get_device_type()
plugins/wacom/gsd-wacom-device.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index 4090302..bafc3b4 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -477,10 +477,10 @@ get_device_type (XDeviceInfo *dev)
device, prop, 0, 1, False,
XA_ATOM, &realtype, &realformat, &nitems,
&bytes_after, &data);
- if (gdk_error_trap_pop () || rc != Success || realtype == None) {
- XCloseDevice (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), device);
+ XCloseDevice (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), device);
+
+ if (gdk_error_trap_pop () || rc != Success || realtype == None)
ret = WACOM_TYPE_INVALID;
- }
XFree (data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]