[lxc-devel] [PATCH 2/4] c/r: remove unused variable mnts

Serge Hallyn serge.hallyn at ubuntu.com
Wed Jun 10 11:56:09 UTC 2015


Quoting Tycho Andersen (tycho.andersen at canonical.com):
> Reported-by: Coverity
> Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>

> ---
>  src/lxc/criu.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/src/lxc/criu.c b/src/lxc/criu.c
> index adcc626..e939b37 100644
> --- a/src/lxc/criu.c
> +++ b/src/lxc/criu.c
> @@ -54,7 +54,6 @@ void exec_criu(struct criu_opts *opts)
>  	struct lxc_list *it;
>  
>  	char buf[4096];
> -	FILE *mnts = NULL;
>  
>  	/* The command line always looks like:
>  	 * criu $(action) --tcp-established --file-locks --link-remap --force-irmap \
> @@ -189,8 +188,6 @@ void exec_criu(struct criu_opts *opts)
>  #undef DECLARE_ARG
>  	execv(argv[0], argv);
>  err:
> -	if (mnts)
> -		fclose(mnts);
>  	for (i = 0; argv[i]; i++)
>  		free(argv[i]);
>  	free(argv);
> -- 
> 2.1.4
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel


More information about the lxc-devel mailing list