From cd6e7fe685824db9225da447acf3ea6ccaa627cd Mon Sep 17 00:00:00 2001 From: Bryce Harrington Date: Fri, 14 Sep 2018 11:45:24 +0900 Subject: [PATCH] evas vg: Check for OOM in evas_cache_vg_entry_create --- src/lib/evas/vg/evas_vg_cache.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/evas/vg/evas_vg_cache.c b/src/lib/evas/vg/evas_vg_cache.c index f628a781d1..4ef27b7d5c 100644 --- a/src/lib/evas/vg/evas_vg_cache.c +++ b/src/lib/evas/vg/evas_vg_cache.c @@ -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;