]> git.ipfire.org Git - thirdparty/curl.git/commit
tool: fix memory mixups
authorDaniel Stenberg <daniel@haxx.se>
Tue, 24 Mar 2026 15:44:48 +0000 (16:44 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 27 Mar 2026 07:10:32 +0000 (08:10 +0100)
commitb71973c1159295e094cc48dbb7442bbc642bd434
tree8289c0198da50303b0b2df2e1090b76d25c8efd3
parent46d0ade0866f591289778cf1b2cb9945f61418a4
tool: fix memory mixups

memory allocated by libcurl must be freed with curl_free() and vice versa,
memory allocated by the tool itself must be freed with curlx_free().

- dynbuf: free libcurl data with curl_free()
- tool_operate: make sure we get URL using the right memory
- tool_operhlp: free libcurl memory with curl_free()
- tool_operate: free curl_maprintf() pointer with curl_free
- var: data from curlx_base64_decode needs curlx_free
- tool_operate: fix memory juggling in etag handling
- tool_cb_hdr: fix memory area mixups
- tool_operate: another mixup in etag management
- tool_cb_hdr: more memory mixup fixes
- tool_cfgable.c: document some details
- tool_help: show global-mem-debug in -V output

Closes #21099
lib/curlx/dynbuf.c
src/tool_cb_hdr.c
src/tool_cfgable.c
src/tool_help.c
src/tool_operate.c
src/tool_operhlp.c
src/var.c