summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_textbox.c
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2020-03-09 16:59:33 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-03-09 17:10:40 +0100
commitfa988becd275853479a0dbfed521c0161c727a28 (patch)
tree0436a0122c80d1a26d6efa279167a40325dc371f /src/lib/elementary/efl_ui_textbox.c
parent6524b0a155e774c5da93547e9ac052f478e98a92 (diff)
efl_ui_textbox: dont leak a array when no type is available
this fixes a possible leak.
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/efl_ui_textbox.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/elementary/efl_ui_textbox.c b/src/lib/elementary/efl_ui_textbox.c
index 3ffa3e096a..11f79b23fd 100644
--- a/src/lib/elementary/efl_ui_textbox.c
+++ b/src/lib/elementary/efl_ui_textbox.c
@@ -529,19 +529,21 @@ static void
529_dnd_drop_cb(void *data EINA_UNUSED, const Efl_Event *ev) 529_dnd_drop_cb(void *data EINA_UNUSED, const Efl_Event *ev)
530{ 530{
531 Efl_Ui_Drop_Event *drop = ev->info; 531 Efl_Ui_Drop_Event *drop = ev->info;
532 Eina_Future *future; 532
533 Eina_Array *types; 533 Eina_Array *types;
534 534
535 EFL_UI_TEXT_DATA_GET(ev->object, sd); 535 EFL_UI_TEXT_DATA_GET(ev->object, sd);
536 types = _figure_out_types(ev->object, sd); 536 types = _figure_out_types(ev->object, sd);
537 537
538 if (!_accepting_drops(ev->object, sd, drop->available_types)) 538 if (_accepting_drops(ev->object, sd, drop->available_types))
539 return; 539 {
540 Eina_Future *future;
540 541
541 future = efl_ui_dnd_drop_data_get(ev->object, 0, eina_array_iterator_new(types)); 542 future = efl_ui_dnd_drop_data_get(ev->object, evas_device_seat_id_get(evas_default_device_get(evas_object_evas_get(ev->object), EFL_INPUT_DEVICE_TYPE_SEAT)), eina_array_iterator_new(types));
542 eina_array_free(types); 543 efl_future_then(ev->object, future, _selection_data_cb);
544 }
543 545
544 efl_future_then(ev->object, future, _selection_data_cb); 546 eina_array_free(types);
545} 547}
546 548
547/* we can't reuse layout's here, because it's on entry_edje only */ 549/* we can't reuse layout's here, because it's on entry_edje only */