---
 src/evdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/evdev.c b/src/evdev.c
index 96f3085..4f3f8cf 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -553,10 +553,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 = calloc(1, sizeof *device);
        if (device == NULL)
                return NULL;
-       memset(device, 0, sizeof *device);
 
        ec = seat->compositor;
        device->output =
-- 
1.8.2.1

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to