mirror of
https://github.com/curl/curl.git
synced 2026-08-13 22:10:55 +03:00
--help: strdup the category
... since it is converted and the original pointer is freed on Windows
unicode handling.
Follow-up to aa8777f63f
Fixes #5977
Closes #5978
Reported-by: xwxbug on github
This commit is contained in:
parent
2df7414a73
commit
5bd63e0619
3 changed files with 14 additions and 14 deletions
|
|
@ -1777,7 +1777,11 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
|
||||
case 'h': /* h for help */
|
||||
if(toggle) {
|
||||
global->help_category = nextarg;
|
||||
if(nextarg) {
|
||||
global->help_category = strdup(nextarg);
|
||||
if(!global->help_category)
|
||||
return PARAM_NO_MEM;
|
||||
}
|
||||
return PARAM_HELP_REQUESTED;
|
||||
}
|
||||
/* we now actually support --no-help too! */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue