mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-29 08:31:35 -08:00
Fix memory leak in fontset handling
* src/font.c (copy_font_spec): Make a deep copy of the input argument FONT. (Bug#21651)
This commit is contained in:
parent
90e9cf85be
commit
28c58bf739
1 changed files with 4 additions and 1 deletions
|
|
@ -3981,7 +3981,10 @@ 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)), CDR (XCAR (tail))), Qnil);
|
||||
pcdr = xcdr_addr (*pcdr);
|
||||
}
|
||||
|
||||
XSETFONT (new_spec, spec);
|
||||
return new_spec;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue