[PATCH 19/30] util: convert pointers to use g_autofree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Barrett Schonefeld <bschoney@xxxxxxxxxx>

- src/util/vircgroupv1.c

Signed-off-by: Barrett Schonefeld <bschoney@xxxxxxxxxx>
---
 src/util/vircgroupv1.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/util/vircgroupv1.c b/src/util/vircgroupv1.c
index 731e9d61d4..984cd50409 100644
--- a/src/util/vircgroupv1.c
+++ b/src/util/vircgroupv1.c
@@ -1549,7 +1549,7 @@ virCgroupV1GetMemoryStat(virCgroupPtr group,
                          unsigned long long *unevictable)
 {
     int ret = -1;
-    char *stat = NULL;
+    g_autofree char *stat = NULL;
     char *line = NULL;
     unsigned long long cacheVal = 0;
     unsigned long long activeAnonVal = 0;
@@ -1614,7 +1614,6 @@ virCgroupV1GetMemoryStat(virCgroupPtr group,
     ret = 0;
 
  cleanup:
-    VIR_FREE(stat);
     return ret;
 }
 
-- 
2.29.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux