This is the existing behavior and it has been widely assumed in the
codebase.
Closes https://github.com/curl/curl/pull/10645
Append arbitrary data of a given length to the end of the buffer.
+If this function fails it calls `Curl_dyn_free` on `dynbuf`.
+
## `Curl_dyn_add`
```c
Append a C string to the end of the buffer.
+If this function fails it calls `Curl_dyn_free` on `dynbuf`.
+
## `Curl_dyn_addf`
```c
Append a `printf()`-style string to the end of the buffer.
+If this function fails it calls `Curl_dyn_free` on `dynbuf`.
+
## `Curl_dyn_vaddf`
```c
Append a `vprintf()`-style string to the end of the buffer.
+If this function fails it calls `Curl_dyn_free` on `dynbuf`.
+
## `Curl_dyn_reset`
```c
include that as well when it uses this code */
void *p = realloc(s->bufr, a);
if(!p) {
- Curl_safefree(s->bufr);
- s->leng = s->allc = 0;
+ Curl_dyn_free(s);
return CURLE_OUT_OF_MEMORY;
}
s->bufr = p;