summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-04-15 10:44:09 -0400
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-04-15 19:26:39 +0200
commite88311ae955b2d54356c455fc05e7c2ff7abaa66 (patch)
tree85ae0026ea0763c5e3d5edb768e08cbde187f26e
parent6a0c8e9d2684b0d05ba9a4990160f04e6e4380e8 (diff)
tests/efl: use alloca for composite model test future to avoid leak
CID 1407236 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11711
-rw-r--r--src/tests/efl/efl_test_composite_model.c3
1 files changed, 1 insertions, 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,
43 Efl_Model *child; 43 Efl_Model *child;
44 Eina_Future **all; 44 Eina_Future **all;
45 45
46 all = calloc(1, sizeof (Eina_Future *) * (eina_value_array_count(&v) + 1)); 46 all = alloca(sizeof (Eina_Future *) * (eina_value_array_count(&v) + 1));
47 if (!all) return eina_value_error_init(ENOMEM);
48 47
49 EINA_VALUE_ARRAY_FOREACH(&v, len, i, child) 48 EINA_VALUE_ARRAY_FOREACH(&v, len, i, child)
50 { 49 {