aboutsummaryrefslogtreecommitdiff
path: root/lib/sendf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sendf.c')
-rw-r--r--lib/sendf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/sendf.c b/lib/sendf.c
index 13275913e..fe3cbb422 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -189,7 +189,7 @@ CURLcode Curl_sendf(int sockfd, struct connectdata *conn,
write_len = strlen(s);
sptr = s;
- do {
+ while (1) {
/* Write the buffer to the socket */
res = Curl_write(conn, sockfd, sptr, write_len, &bytes_written);
@@ -207,8 +207,7 @@ CURLcode Curl_sendf(int sockfd, struct connectdata *conn,
}
else
break;
-
- } while(1);
+ }
free(s); /* free the output string */