[gnome-settings-daemon/gnome-3-4] mouse: fix mem leak
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/gnome-3-4] mouse: fix mem leak
- Date: Tue, 24 Apr 2012 13:56:27 +0000 (UTC)
commit 053f48b3b1b9a3b2ab0714d470da4354735d0c4b
Author: Pavel Vasin <rat4vier gmail com>
Date: Tue Apr 24 10:20:46 2012 +0400
mouse: fix mem leak
https://bugzilla.gnome.org/show_bug.cgi?id=674703
plugins/mouse/gsd-mouse-manager.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/mouse/gsd-mouse-manager.c b/plugins/mouse/gsd-mouse-manager.c
index 49ffb9d..4e2b440 100644
--- a/plugins/mouse/gsd-mouse-manager.c
+++ b/plugins/mouse/gsd-mouse-manager.c
@@ -317,8 +317,6 @@ set_left_handed (GsdMouseManager *manager,
gint n_buttons;
const char *name;
- buttons = g_new (guchar, buttons_capacity);
-
name = gdk_device_get_name (device);
if (name != NULL && g_str_equal ("Virtual core XTEST pointer", name))
return;
@@ -329,6 +327,8 @@ set_left_handed (GsdMouseManager *manager,
if (xdevice == NULL)
return;
+ buttons = g_new (guchar, buttons_capacity);
+
/* If the device is a touchpad, swap tap buttons
* around too, otherwise a tap would be a right-click */
if (device_is_touchpad (xdevice)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]