[packages] tslib: Don't use freed device string.
git-svn-id: svn://svn.openwrt.org/openwrt/packages@18081 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
b35b2e9a6b
commit
ca5710b724
@ -0,0 +1,18 @@
|
||||
--- a/src/tslib.c
|
||||
+++ b/src/tslib.c
|
||||
@@ -372,13 +394,14 @@ xf86TslibInit(InputDriverPtr drv, IDevPtr dev, int flags)
|
||||
s = xf86SetStrOption(pInfo->options, "Device", NULL);
|
||||
|
||||
priv->ts = ts_open(s, 0);
|
||||
- xfree(s);
|
||||
|
||||
if (!priv->ts) {
|
||||
ErrorF("ts_open failed (device=%s)\n",s);
|
||||
xf86DeleteInput(pInfo, 0);
|
||||
+ xfree(s);
|
||||
return NULL;
|
||||
}
|
||||
+ xfree(s);
|
||||
|
||||
if (ts_config(priv->ts)) {
|
||||
ErrorF("ts_config failed\n");
|
Loading…
x
Reference in New Issue
Block a user