summaryrefslogtreecommitdiffstats
path: root/common/glib-ectomy.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/glib-ectomy.c')
-rw-r--r--common/glib-ectomy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/glib-ectomy.c b/common/glib-ectomy.c
index 83a2bb7b..6831fcff 100644
--- a/common/glib-ectomy.c
+++ b/common/glib-ectomy.c
@@ -83,7 +83,7 @@ retry:
void g_io_channel_close(GIOChannel *channel)
{
- if (!channel)
+ if (!channel || channel->fd < 0)
return;
close(channel->fd);