diff options
Diffstat (limited to 'lib/connect.c')
-rw-r--r-- | lib/connect.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/connect.c b/lib/connect.c index 06d2464ae..d7add1067 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -210,11 +210,11 @@ static CURLcode bindlocal(struct connectdata *conn, in_addr_t in; if(Curl_if2ip(data->set.device, myhost, sizeof(myhost))) { - h = Curl_getaddrinfo(data, myhost, 0, &hostdataptr); + h = Curl_resolv(data, myhost, 0, &hostdataptr); } else { if(strlen(data->set.device)>1) { - h = Curl_getaddrinfo(data, data->set.device, 0, &hostdataptr); + h = Curl_resolv(data, data->set.device, 0, &hostdataptr); } if(h) { /* we know data->set.device is shorter than the myhost array */ @@ -229,8 +229,6 @@ static CURLcode bindlocal(struct connectdata *conn, hostent_buf, sizeof(hostent_buf)); */ - if(hostdataptr) - free(hostdataptr); /* allocated by Curl_getaddrinfo() */ return CURLE_HTTP_PORT_FAILED; } @@ -304,9 +302,6 @@ static CURLcode bindlocal(struct connectdata *conn, return CURLE_HTTP_PORT_FAILED; } - if(hostdataptr) - free(hostdataptr); /* allocated by Curl_getaddrinfo() */ - return CURLE_OK; } /* end of device selection support */ |