c
< 	app_reply = kzalloc(size, GFP_KERNEL);
---
> 	app_reply = kzalloc(sizeof(struct app_stats_reply) + app_req.num_ports * sizeof(struct app_stats_elem), GFP_KERNEL);
