[libvirt PATCH] ch: monitor: unref mon->vm before vm

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

 



Do not access 'mon' after unref'ing it.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 src/ch/ch_monitor.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/ch/ch_monitor.c b/src/ch/ch_monitor.c
index 1648d05017..0f8752d1ed 100644
--- a/src/ch/ch_monitor.c
+++ b/src/ch/ch_monitor.c
@@ -543,9 +543,8 @@ void virCHMonitorClose(virCHMonitor *mon)
         g_free(mon->socketpath);
     }
 
+    virObjectUnref(mon->vm);
     virObjectUnref(mon);
-    if (mon->vm)
-        virObjectUnref(mon->vm);
 }
 
 static int
-- 
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