malloc + memset -> zalloc

And for clients using the xmalloc helper, use xzalloc.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2013-08-08 11:57:05 +10:00 committed by Jonas Ådahl
parent 71d66e22e5
commit 3cb516930f

View file

@ -338,11 +338,10 @@ udev_seat_create(struct weston_compositor *c, const char *seat_name)
{
struct udev_seat *seat;
seat = malloc(sizeof *seat);
seat = zalloc(sizeof *seat);
if (!seat)
return NULL;
memset(seat, 0, sizeof *seat);
weston_seat_init(&seat->base, c, seat_name);
seat->base.led_update = drm_led_update;