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

Andrew Vagin avagin at odin.com
Wed Oct 7 04:25:36 PDT 2015


On Wed, Oct 07, 2015 at 02:44:20AM -0700, Kir Kolyshkin wrote:
> 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;
https://lists.openvz.org/pipermail/criu/2015-October/022433.html
>  
>  	memset(fds, -1, sizeof(int) * userns_req->nr_req);
> -- 
> 2.4.3
> 
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list