summaryrefslogtreecommitdiff
path: root/src/udev-seat.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-06-25 10:32:42 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2014-06-25 10:32:42 +1000
commitbad56cac5b17c3eda58facfc87ae6345814ddc16 (patch)
treea375bfb5e5a42bf40d5b3d9a967c3b09d940158d /src/udev-seat.c
parent97a6bf10f95859940379787da2635b69399db40c (diff)
parent89aa3ca176130104f2fc5c034400cbb4c41cf479 (diff)
Merge branch 'ref-counting-context'
Conflicts: src/udev-seat.c test/log.c
Diffstat (limited to 'src/udev-seat.c')
-rw-r--r--src/udev-seat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/udev-seat.c b/src/udev-seat.c
index 9082697f..17cb3cb0 100644
--- a/src/udev-seat.c
+++ b/src/udev-seat.c
@@ -351,6 +351,7 @@ libinput_udev_create_context(const struct libinput_interface *interface,
if (libinput_init(&input->base, interface,
&interface_backend, user_data) != 0) {
+ libinput_unref(&input->base);
free(input);
return NULL;
}
@@ -400,7 +401,7 @@ libinput_udev_create_for_seat(const struct libinput_interface *interface,
return NULL;
if (libinput_udev_assign_seat(libinput, seat_id) != 0) {
- libinput_destroy(libinput);
+ libinput_unref(libinput);
libinput = NULL;
}