Commit bc91d337 authored by Peter Hutterer's avatar Peter Hutterer

Fix potential NULL pointer dereferencing

Found by coverity.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent c8d22938
......@@ -2968,10 +2968,12 @@ xf86libinput_pre_init(InputDriverPtr drv,
return Success;
fail:
if (driver_data->valuators)
valuator_mask_free(&driver_data->valuators);
if (driver_data->valuators_unaccelerated)
valuator_mask_free(&driver_data->valuators_unaccelerated);
if (driver_data) {
if (driver_data->valuators)
valuator_mask_free(&driver_data->valuators);
if (driver_data->valuators_unaccelerated)
valuator_mask_free(&driver_data->valuators_unaccelerated);
}
free(path);
if (shared_device)
xf86libinput_shared_unref(shared_device);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment