1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-04 11:40:22 +00:00

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)
This commit is contained in:
Eli Zaretskii 2017-10-31 21:08:35 +02:00
parent 3e7ebbe1bd
commit 41adf3281e

View File

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