[PATCH libinput 1/5] filter: zalloc the struct to make sure the speed is initialized

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


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

diff --git a/src/filter.c b/src/filter.c
index 89390d1..72ef760 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -286,7 +286,7 @@ create_pointer_accelerator_filter(accel_profile_func_t profile)
 {
 	struct pointer_accelerator *filter;
 
-	filter = malloc(sizeof *filter);
+	filter = zalloc(sizeof *filter);
 	if (filter == NULL)
 		return NULL;
 
-- 
2.1.0



More information about the wayland-devel mailing list