From 1c217d258a62a30314db07044dec4d0e8cb8062f Mon Sep 17 00:00:00 2001 From: raster Date: Sun, 22 Aug 2010 22:35:24 +0000 Subject: [PATCH] mempool -> init the mempool with calloc. we cannot know for sure the mempool backend inits all members, so make sure they are set to 0. not a cost worth quibbling over. how many mempools do you really create during the life of an app? git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@51548 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/eina_mempool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eina_mempool.c b/src/lib/eina_mempool.c index 0d37861..b9062be 100644 --- a/src/lib/eina_mempool.c +++ b/src/lib/eina_mempool.c @@ -76,7 +76,7 @@ _new_va(const char *name, goto on_error; err = EINA_ERROR_OUT_OF_MEMORY; - mp = malloc(sizeof(Eina_Mempool)); + mp = calloc(1, sizeof(Eina_Mempool)); if (!mp) goto on_error; -- 2.7.4