summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorNick White <hg@njw.me.uk>2011-07-16 23:15:40 +0100
committerNick White <hg@njw.me.uk>2011-07-16 23:15:40 +0100
commitdc5eb36ac3a77bce841fafbef996bf4466ff7519 (patch)
tree3218560a82e7ad6d40478fc9cf4b2b04bd800615 /util.c
parent7bfdd55ef327f4a15be78ad4505953006390340a (diff)
Close socket handle after use
Diffstat (limited to 'util.c')
-rw-r--r--util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/util.c b/util.c
index 1017b1b..47facef 100644
--- a/util.c
+++ b/util.c
@@ -57,6 +57,7 @@ int get(char *host, char *path, char **buf) {
for(l=0; (res = fread(*buf+l, 1, 4096, srv)) > 0; l+=res)
*buf = realloc(*buf, sizeof(char *) * (l+4096));
+ fclose(srv);
return l;
}