urlapi: clear password buffer on error path

Reported by Copilot
Bug: https://github.com/curl/curl/pull/21637#pullrequestreview-4809702512
Follow-up to 112a8b5adf #21637
Follow-up to 7c34365cce #21879

Closes #22432
This commit is contained in:
Viktor Szakats 2026-07-29 17:09:06 +02:00
parent 112a8b5adf
commit 64f746ee1e
No known key found for this signature in database

View file

@ -347,6 +347,7 @@ out:
curlx_free(passwdp);
curlx_free(optionsp);
curlx_safefree(u->user);
curlx_strzero(u->password);
curlx_safefree(u->password);
curlx_safefree(u->options);