summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-09-02 14:26:20 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-09-10 09:09:12 +1000
commitc5da32a6105b3cf57b5996971149c39103cd64b3 (patch)
treef153a10cc53f0fa329e0d1c5b32587972cdeeb72
parent34ade08174bfd652cc79bf26d2ad6a10ca73d2c4 (diff)
xfree86: plug minor memory leak.
When no identifier for the device was specified, the allocated IDevRec (and its associated fields) need to be freed. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
-rw-r--r--hw/xfree86/common/xf86Xinput.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index a34ecc111..0aa9c421b 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -911,7 +911,8 @@ NewInputDeviceRequest (InputOption *options, InputAttributes *attrs,
if (!idev->identifier) {
xf86Msg(X_ERROR, "No device identifier specified (ignoring)\n");
- return BadMatch;
+ rval = BadMatch;
+ goto unwind;
}
rval = xf86NewInputDevice(idev, pdev,