From e6e9b006f770ef104fbcdef32dd6e7f42eb114b7 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 17 Aug 2018 00:49:37 +0200 Subject: upload: allocate upload buffer on-demand Saves 16KB on the easy handle for operations that don't need that buffer. Part 1 of #2888 --- lib/multi.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/multi.c') diff --git a/lib/multi.c b/lib/multi.c index c2c5e1c27..0caf94322 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -592,6 +592,7 @@ static CURLcode multi_done(struct connectdata **connp, conn->dns_entry = NULL; } Curl_hostcache_prune(data); + Curl_safefree(data->state.ulbuf); /* if the transfer was completed in a paused state there can be buffered data left to free */ @@ -1575,6 +1576,8 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, multistate(data, CURLM_STATE_SENDPROTOCONNECT); } } + else if(result) + stream_error = TRUE; break; #endif -- cgit v1.2.3