diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2016-10-20 08:42:53 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2016-10-21 07:51:51 +1000 |
commit | bc91d337d7cf765fd23e47783a498e4b3b334f39 (patch) | |
tree | 4c441e49644ed23a6a70c7d84d084aab9609163e /src | |
parent | c8d2293873d3f86e5cefffa5c51cfe423d09c948 (diff) |
Fix potential NULL pointer dereferencing
Found by coverity.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/xf86libinput.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/xf86libinput.c b/src/xf86libinput.c index a3260ae..8ee6cbe 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -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); |