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>
This commit is contained in:
Carlos Garnacho 2016-02-01 20:28:14 +01:00 committed by Bryce Harrington
parent 8efa31b289
commit 15902bf47a

View file

@ -141,7 +141,7 @@ clipboard_source_create(struct clipboard *clipboard,
struct clipboard_source *source;
char **s;
source = malloc(sizeof *source);
source = zalloc(sizeof *source);
if (source == NULL)
return NULL;