summaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2016-02-01 20:28:15 +0100
committerBryce Harrington <bryce@bryceharrington.org>2016-02-01 13:22:33 -0800
commitbeb7a9f92d00e83712c762fd8e2abd6f65773858 (patch)
tree605d8445d45ef44369519e5b3eb63a4b32a59bcc /xwayland
parent15902bf47a91b42b6f9196861c94ab9cdb6b7cf2 (diff)
downloadweston-beb7a9f92d00e83712c762fd8e2abd6f65773858.tar.gz
weston-beb7a9f92d00e83712c762fd8e2abd6f65773858.tar.bz2
weston-beb7a9f92d00e83712c762fd8e2abd6f65773858.zip
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>
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/dnd.c2
-rw-r--r--xwayland/selection.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/xwayland/dnd.c b/xwayland/dnd.c
index a036b30f..f17e4cd0 100644
--- a/xwayland/dnd.c
+++ b/xwayland/dnd.c
@@ -162,7 +162,7 @@ handle_enter(struct weston_wm *wm, xcb_client_message_event_t *client_message)
xcb_get_property_cookie_t cookie;
xcb_get_property_reply_t *reply;
- source = malloc(sizeof *source);
+ source = zalloc(sizeof *source);
if (source == NULL)
return;
diff --git a/xwayland/selection.c b/xwayland/selection.c
index 25ec8482..3fcd5788 100644
--- a/xwayland/selection.c
+++ b/xwayland/selection.c
@@ -197,7 +197,7 @@ weston_wm_get_selection_targets(struct weston_wm *wm)
return;
}
- source = malloc(sizeof *source);
+ source = zalloc(sizeof *source);
if (source == NULL) {
free(reply);
return;