[PATCH libinput 5/5] zalloc the libinput_source, don't malloc it

Peter Hutterer peter.hutterer at who-t.net
Mon Feb 2 17:07:06 PST 2015


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/libinput.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libinput.c b/src/libinput.c
index 951698a..7456b90 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -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;
 
-- 
2.1.0



More information about the wayland-devel mailing list