ecore_wl2: clear out read_data and len
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>
Wed, 13 Jul 2016 15:38:05 +0000 (17:38 +0200)
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>
Wed, 13 Jul 2016 15:52:46 +0000 (17:52 +0200)
they are passed to the event struct, and later freed in there.

src/lib/ecore_wl2/ecore_wl2_dnd.c

index 7e17d86..414bfc4 100644 (file)
@@ -257,7 +257,9 @@ _selection_data_read(void *data, Ecore_Fd_Handler *fdh)
         source->fdh = NULL;
 
         event->data = source->read_data;
+        source->read_data = NULL;
         event->len = source->len;
+        source->len = 0;
         if (source->input->drag.source)
           ecore_event_add(ECORE_WL2_EVENT_DND_DATA_READY, event,
                           _selection_data_ready_cb_free, NULL);