From 15902bf47a91b42b6f9196861c94ab9cdb6b7cf2 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 1 Feb 2016 20:28:14 +0100 Subject: [PATCH] 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 Reviewed-by: Derek Foreman --- src/clipboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ 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; -- 2.7.4