aboutsummaryrefslogtreecommitdiffstats
path: root/src/xftfont.c
diff options
context:
space:
mode:
authorChong Yidong <[email protected]>2008-12-15 01:57:40 +0000
committerChong Yidong <[email protected]>2008-12-15 01:57:40 +0000
commit5c629bf654b2d1c137f1e503b9a58cd75af9199b (patch)
tree251ee5a504b7ef1c20a10d9320fbc0070100440a /src/xftfont.c
parente2cbc40157f50e35bc875aca0cce8b862d2f5442 (diff)
(xftfont_open): Free Xft font pattern if XftFontOpenPattern fails.
Diffstat (limited to 'src/xftfont.c')
-rw-r--r--src/xftfont.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xftfont.c b/src/xftfont.c
index 8eadd06076..21c17a06aa 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -279,7 +279,10 @@ xftfont_open (f, entity, pixel_size)
UNBLOCK_INPUT;
if (! xftfont)
- return Qnil;
+ {
+ XftPatternDestroy (match);
+ return Qnil;
+ }
/* We should not destroy PAT here because it is kept in XFTFONT and
destroyed automatically when XFTFONT is closed. */
font_object = font_make_object (VECSIZE (struct xftfont_info), entity, size);