1
0
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:
Ján Tomko 2021-08-19 14:01:26 +02:00
parent 005e70e9a7
commit 247e8fcc6a

View File

@ -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