vircgroup: move parentPath declaration

It's used only inside the if condition.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Pavel Hrdina 2020-11-02 22:11:36 +01:00
parent 77291414c7
commit 14674ad436

View File

@ -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++;