xwayland: zalloc the x11_data_sources
The wrapped weston_data_source struct has new fields which were left
uninitialized, so its access is unreliable.
The data source in xwayland/dnd.c should be eventually setting the
drag-and-drop actions, but it is a lot more incomplete than that
(read: completely), so falls out of the scope of this patch.
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
diff --git a/xwayland/selection.c b/xwayland/selection.c
index 25ec848..3fcd578 100644
--- a/xwayland/selection.c
+++ b/xwayland/selection.c
@@ -197,7 +197,7 @@
return;
}
- source = malloc(sizeof *source);
+ source = zalloc(sizeof *source);
if (source == NULL) {
free(reply);
return;