summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--input/input-service.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/input/input-service.c b/input/input-service.c
index 02903d0e..3a309068 100644
--- a/input/input-service.c
+++ b/input/input-service.c
@@ -473,22 +473,24 @@ static gboolean interrupt_connect_cb(GIOChannel *chan, GIOCondition cond,
goto failed;
}
- close(ctl);
send_message_and_unref(pc->conn,
dbus_message_new_method_return(pc->msg));
- pending_connect_free(pc);
- g_io_channel_unref(chan);
-
- return FALSE;
-
+ close (ctl);
+ goto cleanup;
failed:
+ err_connection_failed(pc->conn, pc->msg, strerror(err));
+
+cleanup:
if (isk > 0)
close(isk);
+ close(idev->hidp.ctrl_sock);
+
idev->hidp.intr_sock = -1;
- err_connection_failed(pc->conn, pc->msg, strerror(err));
+ idev->hidp.ctrl_sock = -1;
+
pending_connect_free(pc);
g_io_channel_unref(chan);