evas vg: Check for OOM in evas_cache_vg_entry_create

This commit is contained in:
Bryce Harrington 2018-09-14 11:45:24 +09:00 committed by Hermet Park
parent 2191178ef2
commit cd6e7fe685
1 changed files with 6 additions and 0 deletions

View File

@ -316,6 +316,12 @@ evas_cache_vg_entry_find(const char *file, const char *key,
if (!se)
{
se = calloc(1, sizeof(Evas_Cache_Vg_Entry));
if (!se)
{
CRI("Failed to alloc Vg_Cache_Entry");
eina_strbuf_free(hash_key);
return NULL;
}
se->file = eina_stringshare_add(file);
se->key = eina_stringshare_add(key);
se->w = w;