Fix memory leak, from Gabriel Souza Franco.

pull/3269/head
nicm 2022-07-19 06:46:57 +00:00
parent 1afe22086f
commit 3c65475561
1 changed files with 2 additions and 2 deletions

View File

@ -3564,12 +3564,12 @@ found:
}
if (modifiers & FORMAT_QUOTE_SHELL) {
saved = found;
found = xstrdup(format_quote_shell(saved));
found = format_quote_shell(saved);
free(saved);
}
if (modifiers & FORMAT_QUOTE_STYLE) {
saved = found;
found = xstrdup(format_quote_style(saved));
found = format_quote_style(saved);
free(saved);
}
return (found);