From: Lars-Peter Clausen Date: Sat, 25 Apr 2009 16:06:27 +0000 (+0000) Subject: Close tslib device when the module is unloaded. Closes a memory leak and X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9ff1bfb249ad932583ae2ecfb1cefcd179f21d58;p=openwrt%2Fsvn-archive%2Farchive.git Close tslib device when the module is unloaded. Closes a memory leak and allows the device to be reopended when the xserver is restarted. SVN-Revision: 15407 --- diff --git a/Xorg/driver/xf86-input-tslib/patches/020-close-tsdevice-when-module-is-uninitialized.patch b/Xorg/driver/xf86-input-tslib/patches/020-close-tsdevice-when-module-is-uninitialized.patch new file mode 100644 index 0000000000..2af9111188 --- /dev/null +++ b/Xorg/driver/xf86-input-tslib/patches/020-close-tsdevice-when-module-is-uninitialized.patch @@ -0,0 +1,24 @@ +commit b6ff79c07806789a12ca3c5260c5d0b12e212eef +Author: Lars-Peter Clausen +Date: Sat Apr 25 18:00:09 2009 +0200 + + Close tslib device when the module is unloaded. Closes a memory leak and allows + the device to be reopended when the xserver is restarted. + +diff --git a/src/tslib.c b/src/tslib.c +index 50596b7..e7a2766 100644 +--- a/src/tslib.c ++++ b/src/tslib.c +@@ -286,10 +286,12 @@ xf86TslibControlProc(DeviceIntPtr device, int what) + static void + xf86TslibUninit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) + { ++ struct ts_priv *priv = (struct ts_priv *)(pInfo->private); + #ifdef DEBUG + ErrorF("%s\n", __FUNCTION__); + #endif + xf86TslibControlProc(pInfo->dev, DEVICE_OFF); ++ ts_close(priv->ts); + xfree(pInfo->private); + xf86DeleteInput(pInfo, 0); + }