[CRIU] [PATCH 5/9] __userns_sysctl_op(): fix a check

Kir Kolyshkin kir at openvz.org
Wed Oct 7 02:44:20 PDT 2015


This is obviously a copy-paste typo.

Reported by Coverity, CID 114615.

Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 sysctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysctl.c b/sysctl.c
index fb028f6..1e7ee66 100644
--- a/sysctl.c
+++ b/sysctl.c
@@ -225,7 +225,7 @@ static int __userns_sysctl_op(void *arg, int unused, pid_t pid)
 		goto out;
 
 	reqs = xmalloc(sizeof(struct sysctl_req) * userns_req->nr_req);
-	if (!fds)
+	if (!reqs)
 		goto out;
 
 	memset(fds, -1, sizeof(int) * userns_req->nr_req);
-- 
2.4.3



More information about the CRIU mailing list