diff options
author | Nick White <hg@njw.me.uk> | 2011-07-16 23:15:40 +0100 |
---|---|---|
committer | Nick White <hg@njw.me.uk> | 2011-07-16 23:15:40 +0100 |
commit | dc5eb36ac3a77bce841fafbef996bf4466ff7519 (patch) | |
tree | 3218560a82e7ad6d40478fc9cf4b2b04bd800615 /util.c | |
parent | 7bfdd55ef327f4a15be78ad4505953006390340a (diff) |
Close socket handle after use
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; } |