From fbdddf0638972c9859bfdbc69ed5ebe003113044 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 13 Jul 2022 17:09:10 +0200 Subject: [PATCH] fake-input-accelerometer: Fix test program not working We forgot to "steal" the pointer before returning from the function successfully, so the file descriptor was closed. Oops. Fixes: cc11240 ("fake-input-accelerometer: Simplify error paths") --- src/fake-input-accelerometer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fake-input-accelerometer.c b/src/fake-input-accelerometer.c index e789c59..64d26fa 100644 --- a/src/fake-input-accelerometer.c +++ b/src/fake-input-accelerometer.c @@ -157,7 +157,7 @@ setup_uinput (OrientationData *data) return FALSE; } - data->uinput = fd; + data->uinput = g_steal_fd (&fd); return TRUE; }