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

Submitted by Pavel Tikhomirov on April 28, 2016, 4:39 p.m.

Details

Message ID 1461861543-10463-15-git-send-email-ptikhomirov@virtuozzo.com
State Rejected
Series "net/ipv6: c/r dev/default/all conf ops"
Headers show

Commit Message

Pavel Tikhomirov April 28, 2016, 4:39 p.m.
https://jira.sw.ru/browse/PSBM-30942

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;