[PATCH 09/16] virCHProcessUpdateInfo: Automatically free virJSONValue

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

 



Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/ch/ch_process.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/ch/ch_process.c b/src/ch/ch_process.c
index 1a01ca9384..9f82e04485 100644
--- a/src/ch/ch_process.c
+++ b/src/ch/ch_process.c
@@ -121,15 +121,13 @@ virCHProcessUpdateConsole(virDomainObj *vm,
 static int
 virCHProcessUpdateInfo(virDomainObj *vm)
 {
-    virJSONValue *info;
+    g_autoptr(virJSONValue) info = NULL;
     virCHDomainObjPrivate *priv = vm->privateData;
     if (virCHMonitorGetInfo(priv->monitor, &info) < 0)
         return -1;

     virCHProcessUpdateConsole(vm, info);

-    virJSONValueFree(info);
-
     return 0;
 }

-- 
2.31.1




[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