clipboard: zalloc the clipboard_source
The wrapped weston_data_source struct has new fields which were left
uninitialized, so its access is unreliable.
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com
Tested-by: Derek Foreman <derekf@osg.samsung.com>
diff --git a/src/clipboard.c b/src/clipboard.c
index da7dbb6..54a578f 100644
--- a/src/clipboard.c
+++ b/src/clipboard.c
@@ -141,7 +141,7 @@
struct clipboard_source *source;
char **s;
- source = malloc(sizeof *source);
+ source = zalloc(sizeof *source);
if (source == NULL)
return NULL;