bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e88311ae955b2d54356c455fc05e7c2ff7abaa66

commit e88311ae955b2d54356c455fc05e7c2ff7abaa66
Author: Mike Blumenkrantz <[email protected]>
Date:   Wed Apr 15 10:44:09 2020 -0400

    tests/efl: use alloca for composite model test future to avoid leak
    
    CID 1407236
    
    Reviewed-by: Marcel Hollerbach <[email protected]>
    Differential Revision: https://phab.enlightenment.org/D11711
---
 src/tests/efl/efl_test_composite_model.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/tests/efl/efl_test_composite_model.c 
b/src/tests/efl/efl_test_composite_model.c
index d91b243519..b2e0fa630b 100644
--- a/src/tests/efl/efl_test_composite_model.c
+++ b/src/tests/efl/efl_test_composite_model.c
@@ -43,8 +43,7 @@ _children_slice_get_then(Eo *o EINA_UNUSED,
    Efl_Model *child;
    Eina_Future **all;
 
-   all = calloc(1, sizeof (Eina_Future *) * (eina_value_array_count(&v) + 1));
-   if (!all) return eina_value_error_init(ENOMEM);
+   all = alloca(sizeof (Eina_Future *) * (eina_value_array_count(&v) + 1));
 
    EINA_VALUE_ARRAY_FOREACH(&v, len, i, child)
      {

-- 


Reply via email to