From ac7c8b24938184dccff55f6f2875d2c50f07e4dd Mon Sep 17 00:00:00 2001 From: Pavel Tikhomirov Date: Thu, 28 Apr 2016 19:39:02 +0300 Subject: [PATCH] sysctl: fix allocation for array of pointers Signed-off-by: Pavel Tikhomirov Reviewed-by: Andrew Vagin Signed-off-by: Pavel Emelyanov --- criu/sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/criu/sysctl.c b/criu/sysctl.c index 5fced0e0d..a38fcb853 100644 --- a/criu/sysctl.c +++ b/criu/sysctl.c @@ -227,7 +227,7 @@ static int __userns_sysctl_op(void *arg, int proc_fd, pid_t pid) if (!fds) goto out; - reqs = xmalloc(sizeof(struct sysctl_req) * userns_req->nr_req); + reqs = xmalloc(sizeof(struct sysctl_req *) * userns_req->nr_req); if (!reqs) goto out;