diff --git a/src/benchmarks/eina/ecore_strings.c b/src/benchmarks/eina/ecore_strings.c index 15deae6b8f..e56235226c 100644 --- a/src/benchmarks/eina/ecore_strings.c +++ b/src/benchmarks/eina/ecore_strings.c @@ -83,6 +83,7 @@ ecore_string_instance(const char *string) str = (Ecore_String *)malloc(sizeof(Ecore_String) + length * sizeof(char)); + if (!str) return NULL; str->string = (char *)(str + 1); str->references = 0; diff --git a/src/benchmarks/eina/evas_mempool.c b/src/benchmarks/eina/evas_mempool.c index 40df42fd25..156a36f916 100644 --- a/src/benchmarks/eina/evas_mempool.c +++ b/src/benchmarks/eina/evas_mempool.c @@ -40,6 +40,7 @@ _evas_mp_pool_new(Evas_Mempool *pool) item_alloc = ((pool->item_size + sizeof(void *) - 1) / sizeof(void *)) * sizeof(void *); p = malloc(sizeof(Pool) + (pool->pool_size * item_alloc)); + if (!p) return NULL; ptr = (void **)(((unsigned char *)p) + sizeof(Pool)); p->usage = 0; p->base = ptr;