curl: fix memory leak when -h is used in config file

Reported-by: antypanty on hackerone

Add test 748 to reproduce and verify fix

Closes #17306
This commit is contained in:
Daniel Stenberg 2025-05-09 23:43:22 +02:00
parent cd7904f5a9
commit 13032ff75c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
7 changed files with 43 additions and 14 deletions

View file

@ -350,7 +350,6 @@ struct GlobalConfig {
FILE *trace_stream;
char *libcurl; /* Output libcurl code to this filename */
char *ssl_sessions; /* file to load/save SSL session tickets */
char *help_category; /* The help category, if set */
char *knownhosts; /* known host path, if set. curl_free()
this */
struct tool_var *variables;