diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-09-04 18:33:20 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-09-04 18:33:20 +0000 |
commit | a3d776187a775417f550392ada74b57ff09796e6 (patch) | |
tree | 4698ac9dc09f5d87bbb310ea9a2a995ddc673b8f | |
parent | e55f502e2f2e1fc862e701e1c88db3b71f2419ce (diff) | |
download | curl-a3d776187a775417f550392ada74b57ff09796e6.tar.gz |
check that bind() returns success
-rw-r--r-- | lib/tftp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/tftp.c b/lib/tftp.c index 675cdec51..bf50a80ef 100644 --- a/lib/tftp.c +++ b/lib/tftp.c @@ -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); |