mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05: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 */
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user