summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2008-07-22 14:51:59 +0930
committerPeter Hutterer <peter.hutterer@who-t.net>2008-07-22 14:53:11 +0930
commit8dca778b666e8abf5ff4b4c9b0445bc87499b354 (patch)
tree1092743fa87e368ea51eef51e805bdf887eed726
parentc11ed754e5096fa164fab7fa3c7465920e3f47ec (diff)
Plug memory leak - free synaptics private data.
When freeing priv, NULL local->priv, otherwise the server tries to free it again later. This is a memory leak in all but the newest servers from git.
-rw-r--r--src/synaptics.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/synaptics.c b/src/synaptics.c
index f08e8c3..49dfcb6 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -374,8 +374,7 @@ SynapticsPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
pars->tap_time_2 = xf86SetIntOption(opts, "MaxDoubleTapTime", 180);
pars->click_time = xf86SetIntOption(opts, "ClickTime", 100);
pars->fast_taps = xf86SetIntOption(opts, "FastTaps", FALSE);
- pars->emulate_mid_button_time = xf86SetIntOption(opts,
- "EmulateMidButtonTime", 75);
+ pars->emulate_mid_button_time = xf86SetIntOption(opts, "EmulateMidButtonTime", 75);
pars->emulate_twofinger_z = xf86SetIntOption(opts, "EmulateTwoFingerMinZ", 257);
pars->scroll_dist_vert = xf86SetIntOption(opts, "VertScrollDelta", 100);
pars->scroll_dist_horiz = xf86SetIntOption(opts, "HorizScrollDelta", 100);
@@ -490,9 +489,8 @@ SynapticsPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
if (priv->comm.buffer)
XisbFree(priv->comm.buffer);
free_param_data(priv);
- /* Freeing priv makes the X server crash. Don't know why.
- xfree(priv);
- */
+ xfree(priv);
+ local->private = NULL;
return local;
}