mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[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:
@@ -336,9 +336,11 @@ gnc_get_default_report_font_family(void)
|
|||||||
|
|
||||||
pango_font_description_free (font_desc);
|
pango_font_description_free (font_desc);
|
||||||
|
|
||||||
if (default_font_family == NULL ||
|
if (g_str_has_prefix (default_font_family, ".AppleSystemUIFont"))
|
||||||
g_str_has_prefix (default_font_family, ".AppleSystemUIFont"))
|
{
|
||||||
return g_strdup("Arial");
|
g_free (default_font_family);
|
||||||
|
return g_strdup ("Arial");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return default_font_family;
|
return default_font_family;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user