mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 12:51:23 +03:00
speller: do not crash by trying to free something that cannot be freed
Most of the returned error messages are fixed strings, not allocated
strings.
This fixes https://savannah.gnu.org/bugs/?56188.
Reported-by: Aliaksei Sakovets <alexeysakovets@gmail.com>
Bug existed since version 4.1, commit f645009a
.
This commit is contained in:
parent
723451a5ce
commit
493f215513
@ -2717,7 +2717,7 @@ void do_spell(void)
|
||||
else
|
||||
statusline(ALERT, _("Spell checking failed: %s: %s"), result_msg,
|
||||
strerror(errno));
|
||||
free(result_msg);
|
||||
/* Don't try to free the result message; see bug #56188. */
|
||||
} else
|
||||
statusbar(_("Finished checking spelling"));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user