projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67685de
)
Fix use-after-free in x_destroy_window
author
Po Lu
<luangruo@yahoo.com>
Sun, 22 May 2022 05:13:01 +0000
(13:13 +0800)
committer
Po Lu
<luangruo@yahoo.com>
Sun, 22 May 2022 05:13:01 +0000
(13:13 +0800)
* src/xterm.c (x_destroy_window): Fix use after free of the
dpyinfo.
src/xterm.c
patch
|
blob
|
history
diff --git
a/src/xterm.c
b/src/xterm.c
index 5c2deb62e0df06da1a2c2b52403d91174080e23a..0487259bf02d7f5f4e701bbbfd5b5004d4425cca 100644
(file)
--- a/
src/xterm.c
+++ b/
src/xterm.c
@@
-23397,7
+23397,6
@@
x_destroy_window (struct frame *f)
x_free_frame_resources (f);
xfree (f->output_data.x->saved_menu_event);
- xfree (f->output_data.x);
#ifdef HAVE_X_I18N
if (f->output_data.x->preedit_chars)
@@
-23409,6
+23408,7
@@
x_destroy_window (struct frame *f)
XFree (f->output_data.x->xi_masks);
#endif
+ xfree (f->output_data.x);
f->output_data.x = NULL;
dpyinfo->reference_count--;