gpointing-device-settings r101 - trunk/src
- From: hiikezoe svn gnome org
- To: svn-commits-list gnome org
- Subject: gpointing-device-settings r101 - trunk/src
- Date: Tue, 3 Mar 2009 03:36:51 +0000 (UTC)
Author: hiikezoe
Date: Tue Mar 3 03:36:51 2009
New Revision: 101
URL: http://svn.gnome.org/viewvc/gpointing-device-settings?rev=101&view=rev
Log:
fix memory leaks, and trap_push/pop XOpenDevice.
Modified:
trunk/src/gpds-xinput.c
Modified: trunk/src/gpds-xinput.c
==============================================================================
--- trunk/src/gpds-xinput.c (original)
+++ trunk/src/gpds-xinput.c Tue Mar 3 03:36:51 2009
@@ -196,7 +196,9 @@
return NULL;
}
+ gdk_error_trap_push();
device = XOpenDevice(GDK_DISPLAY(), device_info->id);
+ gdk_error_trap_pop();
if (!device) {
g_set_error(error,
GPDS_XINPUT_ERROR,
@@ -300,8 +302,10 @@
name = XGetAtomName(GDK_DISPLAY(), properties[i]);
if (!strcmp(name, property_name)) {
found_atom = properties[i];
+ XFree(name);
break;
}
+ XFree(name);
}
XFree(properties);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]