Fix memory leak, from Gabriel Souza Franco.

This commit is contained in:
nicm
2022-07-19 06:46:57 +00:00
parent 1afe22086f
commit 3c65475561

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);