A device that fails pre_init has a ref to the libinput context but may not have a pInfo->private. For those devices we never call libinput_unref() and the libinput struct never gets freed.
Thus if at least one device didn't pass pre_init, we never cleaned up after ourselves. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> --- src/xf86libinput.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xf86libinput.c b/src/xf86libinput.c index f69943c..a4d9bd5 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -1576,6 +1576,8 @@ fail: valuator_mask_free(&driver_data->valuators_unaccelerated); free(path); free(driver_data); + if (libinput) + driver_context.libinput = libinput_unref(libinput); return BadValue; } -- 2.5.0 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel