[mutter] Free memory allocated by XIQueryPointer()
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Free memory allocated by XIQueryPointer()
- Date: Mon, 4 Mar 2013 18:07:44 +0000 (UTC)
commit 98b0a37442561e4fe44a5561932f3da3ab6b1f52
Author: Pavel Vasin <rat4vier gmail com>
Date: Mon Mar 4 18:57:01 2013 +0400
Free memory allocated by XIQueryPointer()
https://bugzilla.gnome.org/show_bug.cgi?id=695135
src/core/display.c | 2 ++
src/core/keybindings.c | 1 +
src/core/screen.c | 3 +++
src/core/window.c | 3 +++
4 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index e3bf5f6..5a30885 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -71,6 +71,7 @@
#include <X11/extensions/Xcomposite.h>
#include <X11/extensions/Xdamage.h>
#include <X11/extensions/Xfixes.h>
+#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -1674,6 +1675,7 @@ window_focus_on_pointer_rest_callback (gpointer data) {
&root_x, &root_y, &x, &y,
&buttons, &mods, &group);
meta_error_trap_pop (display);
+ free (buttons.mask);
if (root_x != focus_data->pointer_x ||
root_y != focus_data->pointer_y)
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index bfc16a7..8a2dcec 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -1544,6 +1544,7 @@ primary_modifier_still_pressed (MetaDisplay *display,
&root_x, &root_y,
&x, &y,
&buttons, &mods, &group);
+ free (buttons.mask);
meta_topic (META_DEBUG_KEYBINDINGS,
"Primary modifier 0x%x full grab mask 0x%x current state 0x%x\n",
diff --git a/src/core/screen.c b/src/core/screen.c
index cb4827c..1266196 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -52,6 +52,7 @@
#include <locale.h>
#include <string.h>
#include <stdio.h>
+#include <stdlib.h>
static char* get_screen_name (MetaDisplay *display,
int number);
@@ -1985,6 +1986,7 @@ meta_screen_get_mouse_window (MetaScreen *screen,
&mods,
&group);
meta_error_trap_pop (screen->display);
+ free (buttons.mask);
window = meta_stack_get_default_focus_window_at_point (screen->stack,
screen->active_workspace,
@@ -2236,6 +2238,7 @@ meta_screen_get_current_monitor (MetaScreen *screen)
&buttons,
&mods,
&group);
+ free (buttons.mask);
pointer_position.x = root_x_return;
pointer_position.y = root_y_return;
diff --git a/src/core/window.c b/src/core/window.c
index 1faff6b..bcc1fa3 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -48,6 +48,7 @@
#include <X11/Xatom.h>
#include <X11/Xlibint.h> /* For display->resource_mask */
+#include <stdlib.h>
#include <string.h>
#include <math.h>
@@ -6959,6 +6960,8 @@ meta_window_client_message (MetaWindow *window,
button = 3;
else
button = 0;
+
+ free (buttons.mask);
}
if (button != 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]