From c5da32a6105b3cf57b5996971149c39103cd64b3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 2 Sep 2010 14:26:20 +1000 Subject: [PATCH] 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 Reviewed-by: Tiago Vignatti Reviewed-by: Fernando Carrijo --- hw/xfree86/common/xf86Xinput.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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,