eldbus: eina_value not allocated from mempool.

Summary: Eina_Value must be allocated with eina_value_new() to be freed by eina_value_free().
@fix

Reviewers: felipealmeida, larryolj, cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Guilherme Lepsch 2015-02-05 15:15:37 +01:00 committed by Cedric BAIL
parent 36515241b9
commit c5c70e54fc
1 changed files with 5 additions and 8 deletions

View File

@ -317,18 +317,15 @@ _property_changed_iter(void *data, const void *key, Eldbus_Message_Iter *var)
eina_value_struct_value_get(st_value, "arg0", &stack_value);
value = eina_hash_find(proxy->props, skey);
if (value)
if (!value)
{
eina_value_flush(value);
eina_value_copy(&stack_value, value);
}
else
{
value = calloc(1, sizeof(Eina_Value));
eina_value_copy(&stack_value, value);
value = eina_value_new(eina_value_type_get(&stack_value));
eina_hash_add(proxy->props, skey, value);
}
eina_value_flush(value);
eina_value_copy(&stack_value, value);
event.name = skey;
event.value = value;
event.proxy = proxy;