memory: avoid a leak when linter aborts after producing parsable output
Any collected messages should be freed also after an abnormal exit of the linter. Buglet existed since version 2.4.1, commit f225991b.
This commit is contained in:
parent
ee66c13487
commit
7fd38e88c1
@ -2755,6 +2755,13 @@ void do_linter(void)
|
||||
|
||||
if (!WIFEXITED(lint_status) || WEXITSTATUS(lint_status) > 2) {
|
||||
statusline(ALERT, _("Error invoking '%s'"), openfile->syntax->linter);
|
||||
for (curlint = lints; curlint != NULL;) {
|
||||
tmplint = curlint;
|
||||
curlint = curlint->next;
|
||||
free(tmplint->msg);
|
||||
free(tmplint->filename);
|
||||
free(tmplint);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user