mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
glib: Use safe glib event workaround in other event loops
Similarly to the crash workaround:
commit 0db4743645
Author: Daniel P. Berrangé <berrange@redhat.com>
Date: Tue Jul 28 16:52:47 2020 +0100
util: avoid crash due to race in glib event loop code
we need to do this in the other event loop as crash in that one was also
reported:
https://bugzilla.redhat.com/show_bug.cgi?id=1931331
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
8964564550
commit
2a490ce5a0
@ -533,7 +533,7 @@ qemuAgentUnregister(qemuAgentPtr agent)
|
||||
{
|
||||
if (agent->watch) {
|
||||
g_source_destroy(agent->watch);
|
||||
g_source_unref(agent->watch);
|
||||
g_vir_source_unref_safe(agent->watch);
|
||||
agent->watch = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -862,7 +862,7 @@ qemuMonitorUnregister(qemuMonitorPtr mon)
|
||||
{
|
||||
if (mon->watch) {
|
||||
g_source_destroy(mon->watch);
|
||||
g_source_unref(mon->watch);
|
||||
g_vir_source_unref_safe(mon->watch);
|
||||
mon->watch = NULL;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user