From 14674ad436bb50c44b4e4b7d6ecef8bcc624166f Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Mon, 2 Nov 2020 22:11:36 +0100 Subject: [PATCH] vircgroup: move parentPath declaration It's used only inside the if condition. Signed-off-by: Pavel Hrdina Reviewed-by: Michal Privoznik --- src/util/vircgroup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index f4c1623567..6caeb2d7f4 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -893,7 +893,6 @@ virCgroupNewPartition(const char *path, int controllers, virCgroupPtr *group) { - g_autofree char *parentPath = NULL; g_autofree char *newPath = NULL; g_autoptr(virCgroup) parent = NULL; g_autoptr(virCgroup) newGroup = NULL; @@ -915,7 +914,7 @@ virCgroupNewPartition(const char *path, if (STRNEQ(newPath, "/")) { char *tmp; - parentPath = g_strdup(newPath); + g_autofree char *parentPath = g_strdup(newPath); tmp = strrchr(parentPath, '/'); tmp++; -- 2.47.2