diff options
author | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2020-03-09 17:07:35 +0100 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2020-03-09 17:10:40 +0100 |
commit | 5689ce8bfabcd8cf222038183d5e79ec70b53585 (patch) | |
tree | b044f2456697555de93820f159c5a8e0359c25e6 /src/lib/ecore_evas | |
parent | 33203a976404a8123101eef80e951cad1be1d55f (diff) |
ecore_evas: do not leak allocated memory in error case
Diffstat (limited to 'src/lib/ecore_evas')
-rw-r--r-- | src/lib/ecore_evas/ecore_evas.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c index d6d6afd8c2..75a0de18a6 100644 --- a/src/lib/ecore_evas/ecore_evas.c +++ b/src/lib/ecore_evas/ecore_evas.c | |||
@@ -5570,17 +5570,17 @@ ecore_evas_selection_set(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection | |||
5570 | 5570 | ||
5571 | INF("Selection set on seat %d in buffer %d", seat, buffer); | 5571 | INF("Selection set on seat %d in buffer %d", seat, buffer); |
5572 | 5572 | ||
5573 | buffers = _fetch_selection_buffers_of_seat(ee, seat, EINA_TRUE); | ||
5574 | |||
5575 | if (content) | ||
5576 | available_type = eina_content_possible_conversions(content); | ||
5577 | |||
5578 | if (buffer == ECORE_EVAS_SELECTION_BUFFER_DRAG_AND_DROP_BUFFER) | 5573 | if (buffer == ECORE_EVAS_SELECTION_BUFFER_DRAG_AND_DROP_BUFFER) |
5579 | { | 5574 | { |
5580 | ERR("You cannot set a selection with this API, please use the API to start a drag operation"); | 5575 | ERR("You cannot set a selection with this API, please use the API to start a drag operation"); |
5581 | return EINA_FALSE; | 5576 | return EINA_FALSE; |
5582 | } | 5577 | } |
5583 | 5578 | ||
5579 | buffers = _fetch_selection_buffers_of_seat(ee, seat, EINA_TRUE); | ||
5580 | |||
5581 | if (content) | ||
5582 | available_type = eina_content_possible_conversions(content); | ||
5583 | |||
5584 | success = CALL(selection_claim)(ee, seat, buffer, _iterator_to_array(available_type, content ? eina_content_type_get(content) : NULL), content ? _deliver_cb : NULL, content ? _cancel_cb : NULL); | 5584 | success = CALL(selection_claim)(ee, seat, buffer, _iterator_to_array(available_type, content ? eina_content_type_get(content) : NULL), content ? _deliver_cb : NULL, content ? _cancel_cb : NULL); |
5585 | if (success) | 5585 | if (success) |
5586 | { | 5586 | { |