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

@ -3189,7 +3189,7 @@ CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[])
/* Check if we were asked for the help */
if(res == PARAM_HELP_REQUESTED)
tool_help(global->help_category);
; /* already done */
/* Check if we were asked for the manual */
else if(res == PARAM_MANUAL_REQUESTED) {
#ifdef USE_MANUAL