zalloc the libinput_source, don't malloc it
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 2 Feb 2015 23:36:17 +0000 (09:36 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 3 Feb 2015 00:56:38 +0000 (10:56 +1000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ã…dahl <jadahl@gmail.com>
src/libinput.c

index 951698a..7456b90 100644 (file)
@@ -510,7 +510,7 @@ libinput_add_fd(struct libinput *libinput,
        struct libinput_source *source;
        struct epoll_event ep;
 
-       source = malloc(sizeof *source);
+       source = zalloc(sizeof *source);
        if (!source)
                return NULL;