Eo tests: Fix bad free in eo_test_value
authorAvi Levin <avi.levin@samsung.com>
Mon, 12 Jan 2015 11:34:01 +0000 (13:34 +0200)
committerTom Hacohen <tom@stosb.com>
Mon, 12 Jan 2015 11:56:42 +0000 (11:56 +0000)
When running eo_test_suite we get an memory error: "double free or corruption".
That error arises because we try to free an Eina_Value value in eo_test_value
that doesn't need to freed.
I switched the eina_value_free to wina_value_flush, the proper way of
releasing it.

@fix

src/tests/eo/suite/eo_test_value.c

index afdec77..2372d06 100644 (file)
@@ -33,11 +33,11 @@ START_TEST(eo_value)
    eina_value_get(&val2, &eo_val);
    eina_value_pget(&eo_val, &tmpp);
    fail_if(!tmpp);
-   eina_value_free(&val2);
+   eina_value_flush(&val2);
 
    eina_value_setup(&val2, EINA_VALUE_TYPE_INT);
    fail_if(eina_value_convert(&eo_dbg_info->value, &val2));
-   eina_value_free(&val2);
+   eina_value_flush(&val2);
 
    free(str);
    free(str2);