From: Ján Tomko Date: Mon, 22 Sep 2014 11:54:52 +0000 (+0200) Subject: Check for NULL in qemu monitor event filter X-Git-Tag: v1.2.9-rc2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b987c4c3f4829eb8a0134b687cb9748ff724f98a;p=thirdparty%2Flibvirt.git Check for NULL in qemu monitor event filter When virConnectDomainQemuMonitorEventRegister is called with the VIR_CONNECT_DOMAIN_QEMU_MONITOR_EVENT_REGISTER_REGEX flag, ignore the flag instead of crashing. https://bugzilla.redhat.com/show_bug.cgi?id=1144920 --- diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c index bf187cd361..3504b34abd 100644 --- a/src/conf/domain_event.c +++ b/src/conf/domain_event.c @@ -1798,7 +1798,7 @@ virDomainQemuMonitorEventStateRegisterID(virConnectPtr conn, if (VIR_ALLOC(data) < 0) return -1; data->flags = flags; - if (flags != -1) { + if (event && flags != -1) { int rflags = REG_NOSUB; if (flags & VIR_CONNECT_DOMAIN_QEMU_MONITOR_EVENT_REGISTER_NOCASE)