input: Fix not removing security watch when disconnecting
Luiz Augusto von Dentz
maintainerPATCH 1/1 input: Fix not removing security watch when disconnecting
From: Luiz Augusto von Dentz <[email protected]>
If interrupt channels disconnects the security watch would be left dangling as the channel is being shutdown which can cause some bugs:
https://bugzilla.kernel.org/show_bug.cgi?id=204275
--- profiles/input/device.c | 5 +++++ 1 file changed, 5 insertions(+)
profiles/input/device.c +5 -0
@@ -327,6 +327,11 @@ static gboolean intr_watch_cb(GIOChannel *chan, GIOCondition cond, gpointer data idev->intr_io =NULL ; } +if (idev->sec_watch >0 ) { +g_source_remove (idev->sec_watch); + idev->sec_watch =0 ; + } +/* Close control channel */ if (idev->ctrl_io && !(cond &G_IO_NVAL ))g_io_channel_shutdown (idev->ctrl_io, TRUE,NULL );
Signature · 1 line
2.21.0