diff options
author | Alex Larsson <alexl@redhat.com> | 2002-03-26 15:32:37 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2002-03-26 15:32:37 +0000 |
commit | 9d36c1dc2da9797cf08a915008c49570ff38578c (patch) | |
tree | f687bd0750cdb72ee04a3a7fc5787b00e06d5cea /pango/pangoft2-fontmap.c | |
parent | 6f623dc2dca270ef63f518a951411c1d614ffd4e (diff) | |
download | pango-9d36c1dc2da9797cf08a915008c49570ff38578c.tar.gz |
Free pattern after using it.
2002-03-26 Alex Larsson <alexl@redhat.com>
* pango/pangoft2-fontmap.c (pango_ft2_font_map_load_font):
Free pattern after using it.
Diffstat (limited to 'pango/pangoft2-fontmap.c')
-rw-r--r-- | pango/pangoft2-fontmap.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/pango/pangoft2-fontmap.c b/pango/pangoft2-fontmap.c index c0077f1e..da1a7b0d 100644 --- a/pango/pangoft2-fontmap.c +++ b/pango/pangoft2-fontmap.c @@ -519,17 +519,23 @@ pango_ft2_font_map_load_font (PangoFontMap *fontmap, { MiniXftPattern *pattern, *match; MiniXftResult res; - + PangoFont *font; + pattern = pango_ft2_make_pattern (description); match = MiniXftFontMatch ((Display *)1, 0, pattern, &res); MiniXftPatternDestroy (pattern); + + font = NULL; if (match) - return pango_ft2_font_map_new_font (fontmap, match); + { + font = pango_ft2_font_map_new_font (fontmap, match); + MiniXftPatternDestroy (match); + } - return NULL; + return font; } static PangoFontset * |