[CRIU] [PATCH] cgroup: drop dead code

Tycho Andersen tycho.andersen at canonical.com
Thu Mar 10 06:42:10 PST 2016


On Wed, Mar 09, 2016 at 05:06:53PM -0700, Tycho Andersen wrote:
> Must have been from a previous version of this set :(.

Actually, drop this one, It seems that some of the error handling
isn't quite correct here, I'll send another.

> Reported-by: Andrew Vagin <avagin at virtuozzo.com> / Coverity
> Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
> ---
>  criu/cgroup.c | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/criu/cgroup.c b/criu/cgroup.c
> index 9047aa5..20a2a1a 100644
> --- a/criu/cgroup.c
> +++ b/criu/cgroup.c
> @@ -1584,7 +1584,7 @@ static int rewrite_cgsets(CgroupEntry *cge, char **controllers, int n_controller
>  		CgSetEntry *set = cge->sets[i];
>  		for (j = 0; j < set->n_ctls; j++) {
>  			CgMemberEntry *cg = set->ctls[j];
> -			char *tmp = cg->path, *tmp2 = NULL;
> +			char *tmp = cg->path;
>  
>  			if (!(cgroup_contains(controllers, n_controllers, cg->name) &&
>  					/* +1 to get rid of leading / */
> @@ -1621,13 +1621,6 @@ static int rewrite_cgsets(CgroupEntry *cge, char **controllers, int n_controller
>  				}
>  			}
>  
> -			if (tmp2) {
> -				if (!*from)
> -					return -1;
> -
> -				xfree(tmp2);
> -			}
> -
>  			if (!cg->path)
>  				return -1;
>  
> -- 
> 2.5.0
> 


More information about the CRIU mailing list