From: Eli Zaretskii Date: Tue, 31 Oct 2017 19:08:35 +0000 (+0200) Subject: Avoid duplicate calls to xfree for the same pointer X-Git-Tag: emacs-26.0.91~423 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=41adf3281ef6386c539f1fb9d36c4fb3f643b77c;p=emacs.git Avoid duplicate calls to xfree for the same pointer * src/alloc.c (sweep_symbols): Avoid freeing an already freed pointer to a symbol's buffer-local value. (Bug#29066) --- diff --git a/src/alloc.c b/src/alloc.c index d9d74856799..11afdfd7cc0 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -7024,7 +7024,9 @@ sweep_symbols (void) { if (!sym->s.gcmarkbit) { - if (sym->s.redirect == SYMBOL_LOCALIZED) + if (sym->s.redirect == SYMBOL_LOCALIZED + /* Already freed? */ + && !EQ (sym->s.function, Vdead)) xfree (SYMBOL_BLV (&sym->s)); sym->s.next = symbol_free_list; symbol_free_list = &sym->s;