projects
/
platform
/
upstream
/
libinput.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b20d7f
)
tools: record: fix segfault on exit
author
Peter Hutterer
<peter.hutterer@who-t.net>
Wed, 31 Jul 2019 22:28:13 +0000
(08:28 +1000)
committer
Peter Hutterer
<peter.hutterer@who-t.net>
Wed, 31 Jul 2019 22:40:58 +0000
(08:40 +1000)
If we don't supply --with-libinput, the device is NULL so we can't unref it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
tools/libinput-record.c
patch
|
blob
|
history
diff --git
a/tools/libinput-record.c
b/tools/libinput-record.c
index
ff4a12f
..
2d1400e
100644
(file)
--- a/
tools/libinput-record.c
+++ b/
tools/libinput-record.c
@@
-2460,7
+2460,8
@@
main(int argc, char **argv)
rc = mainloop(&ctx);
out:
list_for_each_safe(d, tmp, &ctx.devices, link) {
- libinput_device_unref(d->device);
+ if (d->device)
+ libinput_device_unref(d->device);
free(d->events);
free(d->devnode);
libevdev_free(d->evdev);