mirror of
https://github.com/curl/curl.git
synced 2026-07-25 11:57:16 +03:00
upload: allocate upload buffer on-demand
Saves 16KB on the easy handle for operations that don't need that buffer. Part 1 of #2888
This commit is contained in:
parent
4939f36524
commit
e6e9b006f7
7 changed files with 59 additions and 24 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue