[CRIU] [PATCH] cgroup: drop dead code

Tycho Andersen tycho.andersen at canonical.com
Wed Mar 9 16:06:53 PST 2016


Must have been from a previous version of this set :(.

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