1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-03-09 23:38:56 +00:00

miracle-wfdctl: fix GIOChannel ref leak

Change-Id: I12e647f9b4f13aaa0aedf81907aa251675d2be32
This commit is contained in:
Derek Dai 2017-05-16 09:47:19 +08:00
parent 95f71a7a9d
commit 13b0de7dec
No known key found for this signature in database
GPG key ID: E109CC97553EF009

View file

@ -53,12 +53,12 @@ void sigint_add_watch(SigintHandler handler, gpointer user_data)
int fd = signalfd(-1, &mask, SFD_CLOEXEC); int fd = signalfd(-1, &mask, SFD_CLOEXEC);
GIOChannel *c = g_io_channel_unix_new(fd); GIOChannel *c = g_io_channel_unix_new(fd);
g_io_channel_set_encoding(c, NULL, NULL);
g_io_add_watch_full(c, g_io_add_watch_full(c,
G_PRIORITY_DEFAULT, G_PRIORITY_DEFAULT,
G_IO_IN | G_IO_ERR | G_IO_HUP, G_IO_IN | G_IO_ERR | G_IO_HUP,
sigint_on_signal, sigint_on_signal,
d, d,
g_free); g_free);
g_io_channel_set_encoding(c, NULL, NULL); g_io_channel_unref(c);
/*g_io_channel_unref(c);*/
} }