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 c1bb30da2f
commit 420fbad8bb

View file

@ -552,10 +552,9 @@ evdev_device_create(struct weston_seat *seat, const char *path, int device_fd)
struct weston_compositor *ec;
char devname[256] = "unknown";
device = malloc(sizeof *device);
device = zalloc(sizeof *device);
if (device == NULL)
return NULL;
memset(device, 0, sizeof *device);
ec = seat->compositor;
device->output =