eina: Remove TODO, add code to delete the modules array
authorkabeer khan <kabeer.khan@samsung.com>
Mon, 22 Sep 2014 12:17:26 +0000 (14:17 +0200)
committerCedric BAIL <cedric@osg.samsung.com>
Mon, 22 Sep 2014 12:59:27 +0000 (14:59 +0200)
Summary:
As mentioned in TODO in eina_bench.c I added the code to loop through _modules array and delete each item.:

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>
Reviewers: cedric, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1446

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/benchmarks/eina/eina_bench.c

index a226fd9..1f7d18c 100644 (file)
@@ -66,7 +66,12 @@ static void _mempool_init(void)
 static void _mempool_shutdown(void)
 {
    eina_module_list_free(_modules);
-   /* TODO delete the list */
+   if (_modules)
+     {
+        EINA_ARRAY_ITER_NEXT(_modules, i, module, it)
+          free(module);
+        eina_array_free(_modules);
+     }
    eina_shutdown();
 }