eina: Eina_Value - use eina_mempool_free to cleanup the memory
authorvivek <vivek.ellur@samsung.com>
Thu, 5 Feb 2015 13:57:14 +0000 (14:57 +0100)
committerCedric BAIL <cedric@osg.samsung.com>
Thu, 5 Feb 2015 14:37:15 +0000 (15:37 +0100)
Summary:
The new value is allocated using Eina_Mempool, it should be freed using
eina_mempool, not using libc free.

@fix

Signed-off-by: vivek <vivek.ellur@samsung.com>
Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

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

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

index 4f65ab0..824f11d 100644 (file)
@@ -5017,7 +5017,7 @@ eina_value_new(const Eina_Value_Type *type)
    if (!value) return NULL;
    if (!eina_value_setup(value, type))
      {
-        free(value);
+        eina_mempool_free(_eina_value_mp, value);
         return NULL;
      }
    return value;