mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
77291414c7
commit
14674ad436
|
@ -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++;
|
||||
|
|
Loading…
Reference in New Issue