diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2016-02-01 20:28:14 +0100 |
---|---|---|
committer | Bryce Harrington <bryce@bryceharrington.org> | 2016-02-01 13:22:30 -0800 |
commit | 15902bf47a91b42b6f9196861c94ab9cdb6b7cf2 (patch) | |
tree | 62d92a5e93215219b6791c62fd22706381bc3d3d | |
parent | 8efa31b289a1b176db4b07d5c773a1a63934879d (diff) | |
download | weston-15902bf47a91b42b6f9196861c94ab9cdb6b7cf2.tar.gz |
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>
-rw-r--r-- | src/clipboard.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/clipboard.c b/src/clipboard.c index da7dbb60..54a578f0 100644 --- a/src/clipboard.c +++ b/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; |