[gnc-report.c] free default_font_family

if default_font_family is ".AppleSystemUIFont", it is not freed prior
to returning "Arial".

also default_font_family is given a g_strdup'd string therefore will
never be NULL.
This commit is contained in:
Christopher Lam 2021-07-23 22:17:03 +08:00
parent 7ffe0a5391
commit afea6fd68b

View File

@ -336,9 +336,11 @@ gnc_get_default_report_font_family(void)
pango_font_description_free (font_desc);
if (default_font_family == NULL ||
g_str_has_prefix (default_font_family, ".AppleSystemUIFont"))
if (g_str_has_prefix (default_font_family, ".AppleSystemUIFont"))
{
g_free (default_font_family);
return g_strdup ("Arial");
}
else
return default_font_family;
}