forked from enlightenment/efl
evas_common_font: prevent leaking RGBA_Font
prevent leaking RGBA_Font in the for loop, CID: 1382852 Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11709
This commit is contained in:
parent
c6df676a70
commit
4ea455b1e5
|
@ -751,6 +751,13 @@ evas_font_load(const Eina_List *font_paths, int hinting, Evas_Font_Description *
|
|||
{
|
||||
if (l == fonts || !font) /* First iteration OR no font */
|
||||
{
|
||||
/*This will suppress warnings for resource leak*/
|
||||
if (font)
|
||||
{
|
||||
evas_common_font_free((RGBA_Font*)font);
|
||||
font = NULL;
|
||||
}
|
||||
|
||||
if (source) /* Load Font from "eet" source */
|
||||
{
|
||||
Eet_File *ef;
|
||||
|
|
Loading…
Reference in New Issue