]> xenbits.xensource.com Git - libvirt.git/commit
qemu_hotplug: Don't dereference NULL pointer @newb in qemuDomainChangeNet()
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 15 Feb 2021 17:30:41 +0000 (18:30 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 16 Feb 2021 08:05:33 +0000 (09:05 +0100)
commita1229335f6ce999e53c649c1c006944650462d55
tree730c7fc2352107caf41a2ac69415348d9ba1ca83
parent97f99b4bd406bef1e9c705108570ccf690058e53
qemu_hotplug: Don't dereference NULL pointer @newb in qemuDomainChangeNet()

In one of my previous commits I've made an attempt to restore the
noqueue qdisc on a TAP corresponding to domain's <interface/> if
QoS is cleared out. The commit consisted of two almost identical
hunks. In both the pointer is dereferenced. But in one of them,
the pointer to new bandwidth can't be NULL while in the other it
can leading to a crash.

Fixes: d53b09235398c1320ed2f1b45b640823171467ed
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1919619
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/qemu/qemu_hotplug.c