diff options
author | Seungha Yang <seungha@centricular.com> | 2021-04-05 16:59:42 +0900 |
---|---|---|
committer | Seungha Yang <seungha@centricular.com> | 2021-04-05 17:02:13 +0900 |
commit | 32b85b8f345991533e716ec0f7b278849f5ed4e7 (patch) | |
tree | 31d1306af8e2b00aaf5a4359c84abeb203c1c196 /pango | |
parent | 4d72358ff95b5930be60d7352dc742f16b95c58e (diff) | |
download | pango-32b85b8f345991533e716ec0f7b278849f5ed4e7.tar.gz |
pangowin32: Don't leak various member variables of PangoWin32Font object
Fix for memory leaks around PangoWin32Font
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pangowin32.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/pango/pangowin32.c b/pango/pangowin32.c index 0a90182f..12b4a36e 100644 --- a/pango/pangowin32.c +++ b/pango/pangowin32.c @@ -820,10 +820,7 @@ pango_win32_font_finalize (GObject *object) PangoWin32FontCache *cache = pango_win32_font_map_get_font_cache (win32font->fontmap); PangoWin32Font *fontmap; - if (G_UNLIKELY (!cache)) - return; - - if (win32font->hfont != NULL) + if (cache != NULL && win32font->hfont != NULL) pango_win32_font_cache_unload (cache, win32font->hfont); g_slist_foreach (win32font->metrics_by_lang, (GFunc)free_metrics_info, NULL); |