From 43ea109da4ebe985fa1990b0289f41f3ec30c747 Mon Sep 17 00:00:00 2001
From: tanyifeng <tanyifeng1@huawei.com>
Date: Mon, 14 Jan 2019 15:33:12 +0800
Subject: [PATCH 020/131] fix log error when symlink subcgroup

Signed-off-by: LiFeng <lifeng68@huawei.com>
---
 src/lxc/cgroups/cgfsng.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c
index 705985f2..7f2a200a 100644
--- a/src/lxc/cgroups/cgfsng.c
+++ b/src/lxc/cgroups/cgfsng.c
@@ -1736,21 +1736,21 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops,
 		char **mc;
 		for (mc = merged; *mc; mc++) {
 			char *token;
-			char *merge = must_copy_string(*mc);
-			lxc_iterate_parts(token, merge, ",") {
+			char *copy = must_copy_string(*mc);
+			lxc_iterate_parts(token, copy, ",") {
 				int mret;
 				char *link;
 				link = must_make_path(tmpfspath, token, NULL);
 				mret = symlink(*mc, link);
 				if (mret < 0 && errno != EEXIST) {
-					SYSERROR("Failed to create link %s for target %s", link, merge);
-					free(merge);
+					SYSERROR("Failed to create link %s for target %s", link, *mc);
+					free(copy);
 					free(link);
 					goto on_error;
 				}
 				free(link);
 			}
-			free(merge);
+			free(copy);
 		}
 	}
 
-- 
2.23.0

