summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2006-09-24 17:53:07 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2006-09-24 17:53:07 +0000
commit8900002499f30d2b76447be3b87d3fae9642267d (patch)
treed932ff3b7fd4d99e37f458864fe933e869f5d6c7
parent37beaf51083a857d5d60f042ced13093f5590c80 (diff)
Don't call close for already closed IO channels
-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);