content_encoding: make Curl_all_content_encodings allocless

- Fixes a memory leak pointed out by Coverity
- Also found by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63947
- Avoids unncessary allocations

Follow-up ad051e1cbe

Closes #12289
This commit is contained in:
Daniel Stenberg 2023-11-07 10:58:08 +01:00
parent 36662c3860
commit 82ba603da4
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 27 additions and 26 deletions

View file

@ -27,7 +27,7 @@
struct Curl_cwriter;
char *Curl_all_content_encodings(void);
void Curl_all_content_encodings(char *buf, size_t blen);
CURLcode Curl_build_unencoding_stack(struct Curl_easy *data,
const char *enclist, int is_transfer);