mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-09-06 18:05:39 +00:00
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:
parent
8efa31b289
commit
15902bf47a
|
@ -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…
Reference in a new issue