From 493f215513f196ff16b68e74af4447e21f81d4a0 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 22 Apr 2019 09:39:16 +0200 Subject: [PATCH] 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 Bug existed since version 4.1, commit f645009a. --- src/text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/text.c b/src/text.c index 16c48fdf..7442cee7 100644 --- a/src/text.c +++ b/src/text.c @@ -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")); }