aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2016-01-07 15:44:43 +0100
committertomaka <pierre.krieger1708@gmail.com>2016-01-07 15:44:43 +0100
commit88e64a87a9fcfd0b71803b1adab3cd12787fc90f (patch)
treea563bfe96685fe91cbdbdc561dbb3bd3bd67f967 /src
parent64dbf51105f27f849c5dbd43b930c83d68bb4e2b (diff)
parent21b9245ccccef613f655d3d7f54046e858d4b0df (diff)
downloadglutin-88e64a87a9fcfd0b71803b1adab3cd12787fc90f.tar.gz
glutin-88e64a87a9fcfd0b71803b1adab3cd12787fc90f.zip
Merge pull request #700 from ecoal95/querydevice-leak
x11: Prevent leak on XIQueryDevice
Diffstat (limited to 'src')
-rw-r--r--src/api/x11/input.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/api/x11/input.rs b/src/api/x11/input.rs
index d962e7f..2ebc989 100644
--- a/src/api/x11/input.rs
+++ b/src/api/x11/input.rs
@@ -226,7 +226,7 @@ impl XInputEventHandler {
for axis_id in 0..axis_state.mask_len {
if ffi::XIMaskIsSet(&mask, axis_id) {
let axis_value = unsafe{*axis_state.values.offset(axis_count)};
- let delta = calc_scroll_deltas(event_data, axis_id, axis_value, &self.axis_list,
+ let delta = calc_scroll_deltas(event_data, axis_id, axis_value, &self.axis_list,
&mut self.current_state.axis_values);
scroll_delta.0 += delta.0;
scroll_delta.1 += delta.1;
@@ -314,7 +314,11 @@ fn read_input_axis_info(display: &Arc<XConnection>) -> Vec<Axis> {
}
}
}
-
+
+ unsafe {
+ (display.xinput2.XIFreeDeviceInfo)(devices);
+ }
+
axis_list
}