pixman-renderer: Initialize pixman-renderer struct with zeros

Othrewise a crash may happen because of an unitialized value of the
create_view field.
dev
Ander Conselvan de Oliveira 11 years ago committed by Kristian Høgsberg
parent 7498758525
commit c68b1085ed
  1. 2
      src/pixman-renderer.c

@ -660,7 +660,7 @@ pixman_renderer_init(struct weston_compositor *ec)
{ {
struct pixman_renderer *renderer; struct pixman_renderer *renderer;
renderer = malloc(sizeof *renderer); renderer = calloc(1, sizeof *renderer);
if (renderer == NULL) if (renderer == NULL)
return -1; return -1;

Loading…
Cancel
Save