mirror of
https://github.com/moparisthebest/curl
synced 2025-03-11 07:39:50 -04:00
check that bind() returns success
This commit is contained in:
parent
e55f502e2f
commit
a3d776187a
@ -537,6 +537,10 @@ CURLcode Curl_tftp_connect(struct connectdata *conn, bool *done)
|
|||||||
|
|
||||||
/* Bind to any interface, random UDP port */
|
/* Bind to any interface, random UDP port */
|
||||||
rc = bind(state->sockfd, &state->local_addr, sizeof(state->local_addr));
|
rc = bind(state->sockfd, &state->local_addr, sizeof(state->local_addr));
|
||||||
|
if(rc) {
|
||||||
|
failf(conn->data, "failed to bind\n");
|
||||||
|
return CURLE_COULDNT_CONNECT;
|
||||||
|
}
|
||||||
|
|
||||||
Curl_pgrsStartNow(conn->data);
|
Curl_pgrsStartNow(conn->data);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user