← Commit list

66d6075af9

Daniel Stenberg
Daniel Stenberg
2025-09-20
FAILED Duration: 156s

Subject

tftp: return error when sendto() fails

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/tftp.c+2 -1
@@ -535,11 +535,12 @@ static CURLcode tftp_send_first(struct tftp_conn *state,
(SEND_TYPE_ARG3)sbytes, 0,
CURL_SENDTO_ARG5(&remote_addr->curl_sa_addr),
(curl_socklen_t)remote_addr->addrlen);
+ free(filename);
if(senddata != (ssize_t)sbytes) {
char buffer[STRERROR_LEN];
failf(data, "%s", Curl_strerror(SOCKERRNO, buffer, sizeof(buffer)));
+ return CURLE_SEND_ERROR;
}
- free(filename);
break;
case TFTP_EVENT_OACK: