mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-28 11:21:44 +03:00
ch: monitor: unref mon->vm before vm
Do not access 'mon' after unref'ing it. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
005e70e9a7
commit
247e8fcc6a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user