aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2006-07-04 14:14:36 +0000
committerKim F. Storm2006-07-04 14:14:36 +0000
commit4fbd0f6db18b65a664808fee7d5adab67e2c00ad (patch)
tree38347ca9e694c4663e9d07059febfb92ffe14ce8
parente128be55902a04168ec6261045c30be9e090b5f6 (diff)
downloademacs-4fbd0f6db18b65a664808fee7d5adab67e2c00ad.tar.gz
emacs-4fbd0f6db18b65a664808fee7d5adab67e2c00ad.zip
(x_delete_display): Don't free or derefence NULL pointers.
-rw-r--r--src/xterm.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/xterm.c b/src/xterm.c
index dfa5f4f4413..0b16a37a62c 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10772,12 +10772,16 @@ x_delete_display (dpyinfo)
10772 xfree (dpyinfo->font_table[i].name); 10772 xfree (dpyinfo->font_table[i].name);
10773 } 10773 }
10774 10774
10775 if (dpyinfo->font_table->font_encoder) 10775 if (dpyinfo->font_table)
10776 xfree (dpyinfo->font_table->font_encoder); 10776 {
10777 10777 if (dpyinfo->font_table->font_encoder)
10778 xfree (dpyinfo->font_table); 10778 xfree (dpyinfo->font_table->font_encoder);
10779 xfree (dpyinfo->x_id_name); 10779 xfree (dpyinfo->font_table);
10780 xfree (dpyinfo->color_cells); 10780 }
10781 if (dpyinfo->x_id_name)
10782 xfree (dpyinfo->x_id_name);
10783 if (dpyinfo->color_cells)
10784 xfree (dpyinfo->color_cells);
10781 xfree (dpyinfo); 10785 xfree (dpyinfo);
10782} 10786}
10783 10787