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>
This commit is contained in:
parent
34ade08174
commit
c5da32a610
|
@ -911,7 +911,8 @@ NewInputDeviceRequest (InputOption *options, InputAttributes *attrs,
|
||||||
|
|
||||||
if (!idev->identifier) {
|
if (!idev->identifier) {
|
||||||
xf86Msg(X_ERROR, "No device identifier specified (ignoring)\n");
|
xf86Msg(X_ERROR, "No device identifier specified (ignoring)\n");
|
||||||
return BadMatch;
|
rval = BadMatch;
|
||||||
|
goto unwind;
|
||||||
}
|
}
|
||||||
|
|
||||||
rval = xf86NewInputDevice(idev, pdev,
|
rval = xf86NewInputDevice(idev, pdev,
|
||||||
|
|
Loading…
Reference in New Issue