request: cleanup the auth headers on soft rest as well

To avoid the risk them lingering around.

Follow-up to 3512b673dd

Closes #21311
This commit is contained in:
Daniel Stenberg 2026-04-14 10:56:39 +02:00
parent 67795ff730
commit 99ead4e0f0
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -65,6 +65,11 @@ CURLcode Curl_req_soft_reset(struct SingleRequest *req,
req->httpversion = 0; req->httpversion = 0;
req->sendbuf_hds_len = 0; req->sendbuf_hds_len = 0;
curlx_safefree(req->userpwd);
#ifndef CURL_DISABLE_PROXY
curlx_safefree(req->proxyuserpwd);
#endif
result = Curl_client_start(data); result = Curl_client_start(data);
if(result) if(result)
return result; return result;