mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-04-01 20:05:19 +00:00
util: Prevent libvirtd crash from virNetDevOpenvswitchAddPort()
* src/util/virnetdevopenvswitch.c (virNetDevOpenvswitchAddPort): avoid libvirtd crash due to derefing a NULL virtVlan->tag. RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=852383 Signed-off-by: Alex Jia <ajia@redhat.com>
This commit is contained in:
parent
6fd1708fad
commit
83b85e3e8f
@ -99,7 +99,7 @@ int virNetDevOpenvswitchAddPort(const char *brname, const char *ifname,
|
||||
virBufferAddLit(buf, ",");
|
||||
virBufferAsprintf(buf, "%d", virtVlan->tag[i]);
|
||||
}
|
||||
} else {
|
||||
} else if (virtVlan->nTags) {
|
||||
virBufferAsprintf(buf, "tag=%d", virtVlan->tag[0]);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user