[subset] fix memory leak when map insert fails.
This commit is contained in:
parent
2397689387
commit
8741914a80
|
@ -699,7 +699,14 @@ struct Script
|
||||||
if (c->visitedScript (this)) return;
|
if (c->visitedScript (this)) return;
|
||||||
|
|
||||||
if (!c->script_langsys_map->has (script_index))
|
if (!c->script_langsys_map->has (script_index))
|
||||||
c->script_langsys_map->set (script_index, hb_set_create ());
|
{
|
||||||
|
hb_set_t* empty_set = hb_set_create ();
|
||||||
|
c->script_langsys_map->set (script_index, empty_set);
|
||||||
|
if (!c->script_langsys_map->has (script_index)) {
|
||||||
|
hb_set_destroy (empty_set);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
unsigned langsys_count = get_lang_sys_count ();
|
unsigned langsys_count = get_lang_sys_count ();
|
||||||
if (has_default_lang_sys ())
|
if (has_default_lang_sys ())
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue