mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 23:07:44 +00:00
qemu: fix crash when removing <filterref> from interface with update-device
If a domain network interface that contains a <filterref> is modified "live" using "virsh update-device --live", libvirtd would crash. This was because the code supporting live update of an interface's filterref was assuming that a filterref might be added or modified, but didn't account for removing the filterref, resulting in a null dereference of the filter name. Introduced with commit258fb278
, which was first in libvirt v1.0.1. This addresses https://bugzilla.redhat.com/show_bug.cgi?id=1093301 (cherry picked from commit0eac9d1e90
)
This commit is contained in:
parent
3ee9b60d1a
commit
cde752a9b1
@ -1530,7 +1530,8 @@ qemuDomainChangeNetFilter(virConnectPtr conn,
|
||||
|
||||
virDomainConfNWFilterTeardown(olddev);
|
||||
|
||||
if (virDomainConfNWFilterInstantiate(conn, vm->def->uuid, newdev) < 0) {
|
||||
if (newdev->filter &&
|
||||
virDomainConfNWFilterInstantiate(conn, vm->def->uuid, newdev) < 0) {
|
||||
virErrorPtr errobj;
|
||||
|
||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||
|
Loading…
Reference in New Issue
Block a user