mirror of
https://github.com/curl/curl.git
synced 2026-08-25 21:03:34 +03:00
dynbuf: introduce internal generic dynamic buffer functions
A common set of functions instead of many separate implementations for creating buffers that can grow when appending data to them. Existing functionality has been ported over. In my early basic testing, the total number of allocations seem at roughly the same amount as before, possibly a few less. See docs/DYNBUF.md for a description of the API. Closes #5300
This commit is contained in:
parent
00c2e8da9a
commit
ed35d6590e
27 changed files with 881 additions and 862 deletions
|
|
@ -616,7 +616,7 @@ static CURLcode multi_done(struct Curl_easy *data,
|
|||
/* if the transfer was completed in a paused state there can be buffered
|
||||
data left to free */
|
||||
for(i = 0; i < data->state.tempcount; i++) {
|
||||
free(data->state.tempwrite[i].buf);
|
||||
Curl_dyn_free(&data->state.tempwrite[i].b);
|
||||
}
|
||||
data->state.tempcount = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue