diff options
| author | Chong Yidong | 2008-12-15 01:57:40 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-12-15 01:57:40 +0000 |
| commit | 5c629bf654b2d1c137f1e503b9a58cd75af9199b (patch) | |
| tree | 251ee5a504b7ef1c20a10d9320fbc0070100440a /src | |
| parent | e2cbc40157f50e35bc875aca0cce8b862d2f5442 (diff) | |
| download | emacs-5c629bf654b2d1c137f1e503b9a58cd75af9199b.tar.gz emacs-5c629bf654b2d1c137f1e503b9a58cd75af9199b.zip | |
(xftfont_open): Free Xft font pattern if XftFontOpenPattern fails.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xftfont.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xftfont.c b/src/xftfont.c index 8eadd060765..21c17a06aa2 100644 --- a/src/xftfont.c +++ b/src/xftfont.c | |||
| @@ -279,7 +279,10 @@ xftfont_open (f, entity, pixel_size) | |||
| 279 | UNBLOCK_INPUT; | 279 | UNBLOCK_INPUT; |
| 280 | 280 | ||
| 281 | if (! xftfont) | 281 | if (! xftfont) |
| 282 | return Qnil; | 282 | { |
| 283 | XftPatternDestroy (match); | ||
| 284 | return Qnil; | ||
| 285 | } | ||
| 283 | /* We should not destroy PAT here because it is kept in XFTFONT and | 286 | /* We should not destroy PAT here because it is kept in XFTFONT and |
| 284 | destroyed automatically when XFTFONT is closed. */ | 287 | destroyed automatically when XFTFONT is closed. */ |
| 285 | font_object = font_make_object (VECSIZE (struct xftfont_info), entity, size); | 288 | font_object = font_make_object (VECSIZE (struct xftfont_info), entity, size); |