It's used only inside the if condition.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
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.26.2