[v7,13/14] sysctl: fix allocation for array of pointers

Submitted by Pavel Tikhomirov on April 26, 2016, 11:49 a.m.

Details

Message ID 1461671385-29894-2-git-send-email-ptikhomirov@virtuozzo.com
State Accepted
Series "net/ipv6: c/r dev/default/all conf ops"
Commit 9e37c7fce60573c8d87e379d4c47a9785676f2b8
Headers show

Commit Message

Pavel Tikhomirov April 26, 2016, 11:49 a.m.
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
 criu/sysctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/criu/sysctl.c b/criu/sysctl.c
index 60e52db..9e4be28 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;