lxc/0020-fix-log-error-when-symlink-subcgroup.patch

45 lines
1.3 KiB
Diff
Raw Normal View History

From a4a3b0c8f6a33676c62729ab7fc1e7d6f54536b8 Mon Sep 17 00:00:00 2001
2019-09-30 11:03:07 -04:00
From: tanyifeng <tanyifeng1@huawei.com>
Date: Mon, 14 Jan 2019 15:33:12 +0800
Subject: [PATCH 020/140] fix log error when symlink subcgroup
2019-09-30 11:03:07 -04:00
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 705985f..7f2a200 100644
2019-09-30 11:03:07 -04:00
--- 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);
}
}
--
1.8.3.1
2019-09-30 11:03:07 -04:00