1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

util: cgroupv1: convert pointers to use g_autofree

Signed-off-by: Barrett Schonefeld <bschoney@utexas.edu>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Barrett Schonefeld 2020-11-23 16:09:40 -06:00 committed by Ján Tomko
parent 20aee6203b
commit 32ec462fd9

View File

@ -1549,7 +1549,7 @@ virCgroupV1GetMemoryStat(virCgroupPtr group,
unsigned long long *unevictable) unsigned long long *unevictable)
{ {
int ret = -1; int ret = -1;
char *stat = NULL; g_autofree char *stat = NULL;
char *line = NULL; char *line = NULL;
unsigned long long cacheVal = 0; unsigned long long cacheVal = 0;
unsigned long long activeAnonVal = 0; unsigned long long activeAnonVal = 0;
@ -1614,7 +1614,6 @@ virCgroupV1GetMemoryStat(virCgroupPtr group,
ret = 0; ret = 0;
cleanup: cleanup:
VIR_FREE(stat);
return ret; return ret;
} }