summaryrefslogtreecommitdiff
path: root/src/lib/efl_wl
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-07-12 12:00:52 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-07-12 11:59:21 -0400
commit9940cabd13f5afd9dbf1fd496123f894ad13c57a (patch)
tree12d8ce4d397973cc2949ea912139feaa4a6b03e5 /src/lib/efl_wl
parent39c70f1fa7dca2c8b914736a1dbde8a12b2e4b03 (diff)
efl-wl: free atom name when sending selection
CID 1377542
Diffstat (limited to 'src/lib/efl_wl')
-rw-r--r--src/lib/efl_wl/x11.x5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/efl_wl/x11.x b/src/lib/efl_wl/x11.x
index f5220c1428..49bc0560a9 100644
--- a/src/lib/efl_wl/x11.x
+++ b/src/lib/efl_wl/x11.x
@@ -99,6 +99,7 @@ x11_send_send(Comp_Data_Device_Source *source, const char* mime_type, int32_t fd
99 Ecore_X_Atom t, sel = ECORE_X_ATOM_SELECTION_CLIPBOARD; 99 Ecore_X_Atom t, sel = ECORE_X_ATOM_SELECTION_CLIPBOARD;
100 Comp_Data_Device_Transfer *dt; 100 Comp_Data_Device_Transfer *dt;
101 Ecore_Window win; 101 Ecore_Window win;
102 char *name;
102 win = ecore_evas_window_get(ecore_evas_ecore_evas_get(source->seat->c->evas)); 103 win = ecore_evas_window_get(ecore_evas_ecore_evas_get(source->seat->c->evas));
103 if (type == COMP_DATA_DEVICE_OFFER_TYPE_DND) 104 if (type == COMP_DATA_DEVICE_OFFER_TYPE_DND)
104 sel = ECORE_X_ATOM_SELECTION_XDND; 105 sel = ECORE_X_ATOM_SELECTION_XDND;
@@ -112,7 +113,9 @@ x11_send_send(Comp_Data_Device_Source *source, const char* mime_type, int32_t fd
112 dt->type = type; 113 dt->type = type;
113 dt->fdh = ecore_main_fd_handler_add(fd, 0, x11_offer_write, dt, NULL, NULL); 114 dt->fdh = ecore_main_fd_handler_add(fd, 0, x11_offer_write, dt, NULL, NULL);
114 dt->source = source; 115 dt->source = source;
115 dt->mime_type = eina_stringshare_add(ecore_x_atom_name_get(t)); 116 name = ecore_x_atom_name_get(t);
117 dt->mime_type = eina_stringshare_add(name);
118 free(name);
116 dt->source->transfers = eina_inlist_append(dt->source->transfers, EINA_INLIST_GET(dt)); 119 dt->source->transfers = eina_inlist_append(dt->source->transfers, EINA_INLIST_GET(dt));
117 xconvertselection(ecore_x_display_get(), sel, t, comp_dnd_atom, win, ecore_x_current_time_get()); 120 xconvertselection(ecore_x_display_get(), sel, t, comp_dnd_atom, win, ecore_x_current_time_get());
118} 121}