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:
committed by
Bryce Harrington
parent
8efa31b289
commit
15902bf47a
+1
-1
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user