summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/efl_ui_caching_factory.c19
-rw-r--r--src/lib/elementary/efl_ui_widget_factory.c17
2 files changed, 23 insertions, 13 deletions
diff --git a/src/lib/elementary/efl_ui_caching_factory.c b/src/lib/elementary/efl_ui_caching_factory.c
index 7dbfc0a..5c714d9 100644
--- a/src/lib/elementary/efl_ui_caching_factory.c
+++ b/src/lib/elementary/efl_ui_caching_factory.c
@@ -201,15 +201,15 @@ _efl_ui_caching_factory_efl_ui_factory_create(Eo *obj,
201 Efl_Ui_Caching_Factory_Data *pd, 201 Efl_Ui_Caching_Factory_Data *pd,
202 Eina_Iterator *models) 202 Eina_Iterator *models)
203{ 203{
204 Efl_Ui_Caching_Factory_Request *r; 204 Efl_Ui_Caching_Factory_Request *r = NULL;
205 Efl_Ui_Caching_Factory_Group_Request *gr; 205 Efl_Ui_Caching_Factory_Group_Request *gr = NULL;
206 Efl_Gfx_Entity *w = NULL; 206 Efl_Gfx_Entity *w = NULL;
207 Efl_Model *model; 207 Efl_Model *model = NULL;
208 Eina_Future *f; 208 Eina_Future *f = NULL;
209 209
210 if (pd->cache && pd->style && !pd->klass) 210 if (pd->cache && pd->style && !pd->klass)
211 { 211 {
212 Eina_Future **all; 212 Eina_Future **all = NULL;
213 int count = 0; 213 int count = 0;
214 214
215 r = calloc(1, sizeof (Efl_Ui_Caching_Factory_Request)); 215 r = calloc(1, sizeof (Efl_Ui_Caching_Factory_Request));
@@ -228,8 +228,13 @@ _efl_ui_caching_factory_efl_ui_factory_create(Eo *obj,
228 .success = _efl_ui_caching_factory_create_then, 228 .success = _efl_ui_caching_factory_create_then,
229 .data = r); 229 .data = r);
230 230
231 all = realloc(all, (count + 1) * sizeof (Eina_Future *)); 231 Eina_Future **tmp = realloc(all, (count + 1) * sizeof (Eina_Future *));
232 if (!all) goto alloc_array_error; 232 if (!tmp)
233 {
234 free(all);
235 goto alloc_array_error;
236 }
237 all = tmp;
233 } 238 }
234 eina_iterator_free(models); 239 eina_iterator_free(models);
235 240
diff --git a/src/lib/elementary/efl_ui_widget_factory.c b/src/lib/elementary/efl_ui_widget_factory.c
index 13160af..5ab9477 100644
--- a/src/lib/elementary/efl_ui_widget_factory.c
+++ b/src/lib/elementary/efl_ui_widget_factory.c
@@ -267,9 +267,9 @@ static Eina_Future *
267_efl_ui_widget_factory_efl_ui_factory_create(Eo *obj, Efl_Ui_Widget_Factory_Data *pd, 267_efl_ui_widget_factory_efl_ui_factory_create(Eo *obj, Efl_Ui_Widget_Factory_Data *pd,
268 Eina_Iterator *models) 268 Eina_Iterator *models)
269{ 269{
270 Efl_Ui_Widget_Factory_Request *r; 270 Efl_Ui_Widget_Factory_Request *r = NULL;
271 Eina_Future **f; 271 Eina_Future **f = NULL;
272 Efl_Model *model; 272 Efl_Model *model = NULL;
273 int count = 0; 273 int count = 0;
274 274
275 if (!pd->klass) 275 if (!pd->klass)
@@ -277,7 +277,7 @@ _efl_ui_widget_factory_efl_ui_factory_create(Eo *obj, Efl_Ui_Widget_Factory_Data
277 277
278 if (!pd->style) 278 if (!pd->style)
279 { 279 {
280 Efl_Ui_Widget *w; 280 Efl_Ui_Widget *w = NULL;
281 Eina_Value r; 281 Eina_Value r;
282 282
283 eina_value_array_setup(&r, EINA_VALUE_TYPE_OBJECT, 4); 283 eina_value_array_setup(&r, EINA_VALUE_TYPE_OBJECT, 4);
@@ -309,8 +309,13 @@ _efl_ui_widget_factory_efl_ui_factory_create(Eo *obj, Efl_Ui_Widget_Factory_Data
309 .success = _efl_ui_widget_factory_create_then, 309 .success = _efl_ui_widget_factory_create_then,
310 .free = _efl_ui_widget_factory_single_cleanup); 310 .free = _efl_ui_widget_factory_single_cleanup);
311 311
312 f = realloc(f, (count + 1) * sizeof (Eina_Future *)); 312 Eina_Future** tmp = realloc(f, (count + 1) * sizeof (Eina_Future *));
313 if (!f) goto alloc_array_error; 313 if (!tmp)
314 {
315 free(f);
316 goto alloc_array_error;
317 }
318 f = tmp;
314 } 319 }
315 eina_iterator_free(models); 320 eina_iterator_free(models);
316 321