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>
dev
Carlos Garnacho 9 years ago committed by Bryce Harrington
parent 8efa31b289
commit 15902bf47a
  1. 2
      src/clipboard.c

@ -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;

Loading…
Cancel
Save