Diff between b6df31f1c89149ac2a008421168acf291ba181e8 and 2ad102d3d7c5caf82f9386e75b966dd9d4b4628a
Changed Files
| File | Additions | Deletions | Status |
| src/shared/io-glib.c | +6 | -0 | modified |
Full Patch
diff --git a/src/shared/io-glib.c b/src/shared/io-glib.c
index a7ac95f..010dc71 100644
--- a/src/shared/io-glib.c
+++ b/src/shared/io-glib.c
@@ -77,6 +77,12 @@ void io_destroy(struct io *io)
if (!io)
return;
+ if (io->read_watch > 0)
+ g_source_remove(io->read_watch);
+
+ if (io->write_watch > 0)
+ g_source_remove(io->write_watch);
+
g_io_channel_unref(io->channel);
g_free(io);