changeset 15071:2ae4beb73bf5

(Fx_list_fonts) [BROKEN_XLISTFONTSWITHINFO]: Free the font, and the fontinfo too if we don't want it.
author Richard M. Stallman <rms@gnu.org>
date Thu, 25 Apr 1996 03:36:01 +0000
parents ec84bec5804e
children ff25c6944c3d
files src/xfns.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfns.c	Wed Apr 24 23:39:19 1996 +0000
+++ b/src/xfns.c	Thu Apr 25 03:36:01 1996 +0000
@@ -3480,6 +3480,12 @@
 	      UNBLOCK_INPUT;
 
 	      keeper = thisinfo && same_size_fonts (thisinfo, size_ref);
+	      BLOCK_INPUT;
+	      if (thisinfo && ! keeper)
+		XFreeFont (FRAME_X_DISPLAY (f), thisinfo);
+	      else if (thisinfo)
+		XFreeFontInfo (NULL, thisinfo, 1);
+	      UNBLOCK_INPUT;
 #else
 	      keeper = same_size_fonts (&info[i], size_ref);
 #endif