[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 41adf32: Avoid duplicate calls to xfree for the s
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-26 41adf32: Avoid duplicate calls to xfree for the same pointer |
Date: |
Tue, 31 Oct 2017 15:09:46 -0400 (EDT) |
branch: emacs-26
commit 41adf3281ef6386c539f1fb9d36c4fb3f643b77c
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
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)
---
src/alloc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/alloc.c b/src/alloc.c
index d9d7485..11afdfd 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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 41adf32: Avoid duplicate calls to xfree for the same pointer,
Eli Zaretskii <=