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 | |
parent | 7bfdd55ef327f4a15be78ad4505953006390340a (diff) |
Close socket handle after use
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | util.c | 1 |
2 files changed, 1 insertions, 2 deletions
@@ -1,5 +1,3 @@ -only dial once; use a global file handle for this (may need to be extern) - use order to be able to use real page numbers (getpagecode) to find this advance through click3 letter by letter until either } (none found) or strcmp "order" @@ -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; } |