noop-renderer: zero-initialize struct
This ensures that all function pointers we do not fill in will be NULL. I had a crash in the Xwayland test with https://gitlab.freedesktop.org/wayland/weston/merge_requests/274 without this, because import_dmabuf was garbage. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
committed by
Pekka Paalanen
parent
ecdf50d38e
commit
209187491b
@@ -106,7 +106,7 @@ noop_renderer_init(struct weston_compositor *ec)
|
|||||||
{
|
{
|
||||||
struct weston_renderer *renderer;
|
struct weston_renderer *renderer;
|
||||||
|
|
||||||
renderer = malloc(sizeof *renderer);
|
renderer = zalloc(sizeof *renderer);
|
||||||
if (renderer == NULL)
|
if (renderer == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user