summaryrefslogtreecommitdiff
path: root/lib/multi.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-08-17 00:49:37 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-08-18 15:48:08 +0200
commite6e9b006f770ef104fbcdef32dd6e7f42eb114b7 (patch)
tree6540dd5559e06f6ae7052c743dd0359cad960bcd /lib/multi.c
parent4939f3652473c1519d2b604068efb87ef7531874 (diff)
downloadcurl-e6e9b006f770ef104fbcdef32dd6e7f42eb114b7.tar.gz
upload: allocate upload buffer on-demand
Saves 16KB on the easy handle for operations that don't need that buffer. Part 1 of #2888
Diffstat (limited to 'lib/multi.c')
-rw-r--r--lib/multi.c3
1 files changed, 3 insertions, 0 deletions
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