summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-06-30 11:32:16 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-06-30 11:32:16 +0000
commitc7a9e07909484c30707bcae70d5eae3e44d91b71 (patch)
treeaf02225746eb7697b4afe60ce53c62f497873f3b
parent185baf036b9bcfe1386a6fd1549ca5403ec66812 (diff)
downloadcurl-c7a9e07909484c30707bcae70d5eae3e44d91b71.tar.gz
simplified the check for when to free() the buf data
-rw-r--r--lib/hostip4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hostip4.c b/lib/hostip4.c
index f380d3ef8..b0196d15a 100644
--- a/lib/hostip4.c
+++ b/lib/hostip4.c
@@ -362,8 +362,8 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
if(h) {
ai = Curl_he2ai(h, port);
- if (h == buf) /* used a *_r() function */
- free(h);
+ if (buf) /* used a *_r() function */
+ free(buf);
}
return ai;