mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-05 05:45:46 +00:00
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
Block a user