diff options
| author | Eli Zaretskii | 2017-10-31 21:08:35 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2017-10-31 21:08:35 +0200 |
| commit | 41adf3281ef6386c539f1fb9d36c4fb3f643b77c (patch) | |
| tree | 7601515eb2e861e84fef1b158f6f2aa338473982 /src/alloc.c | |
| parent | 3e7ebbe1bd5d33476190c789d17e4dd2d5f1bdfb (diff) | |
| download | emacs-41adf3281ef6386c539f1fb9d36c4fb3f643b77c.tar.gz emacs-41adf3281ef6386c539f1fb9d36c4fb3f643b77c.zip | |
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)
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) | |||
| 7024 | { | 7024 | { |
| 7025 | if (!sym->s.gcmarkbit) | 7025 | if (!sym->s.gcmarkbit) |
| 7026 | { | 7026 | { |
| 7027 | if (sym->s.redirect == SYMBOL_LOCALIZED) | 7027 | if (sym->s.redirect == SYMBOL_LOCALIZED |
| 7028 | /* Already freed? */ | ||
| 7029 | && !EQ (sym->s.function, Vdead)) | ||
| 7028 | xfree (SYMBOL_BLV (&sym->s)); | 7030 | xfree (SYMBOL_BLV (&sym->s)); |
| 7029 | sym->s.next = symbol_free_list; | 7031 | sym->s.next = symbol_free_list; |
| 7030 | symbol_free_list = &sym->s; | 7032 | symbol_free_list = &sym->s; |