mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
virCgroupNewPartition: Don't leak @newpath
The @newpath variable is allocated in virCgroupSetPartitionSuffix(). But it's newer freed.
This commit is contained in:
parent
36bac65d8a
commit
bc13222185
@ -1249,7 +1249,7 @@ int virCgroupNewPartition(const char *path,
|
||||
int rc;
|
||||
char *parentPath = NULL;
|
||||
virCgroupPtr parent = NULL;
|
||||
char *newpath;
|
||||
char *newpath = NULL;
|
||||
VIR_DEBUG("path=%s create=%d controllers=%x",
|
||||
path, create, controllers);
|
||||
|
||||
@ -1295,6 +1295,7 @@ cleanup:
|
||||
virCgroupFree(group);
|
||||
virCgroupFree(&parent);
|
||||
VIR_FREE(parentPath);
|
||||
VIR_FREE(newpath);
|
||||
return rc;
|
||||
}
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user