* bug#21651: 25.0.50; [PATCH] Memory leak: auto_fontset_alist has keys that are modified externally by mistake
@ 2015-10-08 21:49 Dima Kogan
2015-10-20 15:14 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Dima Kogan @ 2015-10-08 21:49 UTC (permalink / raw)
To: 21651
[-- Attachment #1: Type: text/plain, Size: 283 bytes --]
This issue was discussed on the mailing list with the thread starting
here:
https://lists.gnu.org/archive/html/emacs-devel/2015-10/msg00550.html
A patch was proposed here:
https://lists.gnu.org/archive/html/emacs-devel/2015-10/msg00292.html
and is copied here as an attachment.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-copy_font_spec-now-makes-a-deeper-copy-of-its-input.patch --]
[-- Type: text/x-diff, Size: 855 bytes --]
From: Dima Kogan <dima@secretsauce.net>
Date: Mon, 5 Oct 2015 11:21:12 -0700
Subject: (copy_font_spec) now makes a deeper copy of its input
---
src/font.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/font.c b/src/font.c
index a52a653..0b2999e 100644
--- a/src/font.c
+++ b/src/font.c
@@ -3981,7 +3981,12 @@ copy_font_spec (Lisp_Object font)
pcdr = spec->props + FONT_EXTRA_INDEX;
for (tail = AREF (font, FONT_EXTRA_INDEX); CONSP (tail); tail = XCDR (tail))
if (!EQ (XCAR (XCAR (tail)), QCfont_entity))
- *pcdr = Fcons (XCAR (tail), Qnil), pcdr = xcdr_addr (*pcdr);
+ {
+ *pcdr = Fcons (Fcons( XCAR (XCAR (tail)),
+ XCDR (XCAR (tail))),
+ Qnil);
+ pcdr = xcdr_addr (*pcdr);
+ }
XSETFONT (new_spec, spec);
return new_spec;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-20 15:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-08 21:49 bug#21651: 25.0.50; [PATCH] Memory leak: auto_fontset_alist has keys that are modified externally by mistake Dima Kogan
2015-10-20 15:14 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.