summaryrefslogtreecommitdiff
path: root/uclient-http.c
diff options
context:
space:
mode:
Diffstat (limited to 'uclient-http.c')
-rw-r--r--uclient-http.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/uclient-http.c b/uclient-http.c
index ebe7758..8d6d327 100644
--- a/uclient-http.c
+++ b/uclient-http.c
@@ -149,7 +149,8 @@ static void uclient_http_disconnect(struct uclient_http *uh)
if (uh->ssl)
ustream_free(&uh->ussl.stream);
ustream_free(&uh->ufd.stream);
- close(uh->ufd.fd.fd);
+ if(uh->ufd.fd.fd)
+ close(uh->ufd.fd.fd);
uh->us = NULL;
}