mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
networkStartNetworkVirtual: Don't overwrite error in 'err5'
If there's an error when setting up QoS on a bridge the control jumps over to 'err5' label. Here, the virNetDevBandwidthClear() is called to clear out any partially set QoS. This function can also report an error which would overwrite the actual error that caused us jumping here. Use virErrorPreserveLast() to preserve the original error. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
77bca8b730
commit
1cc1b8360b
@ -2493,6 +2493,7 @@ networkStartNetworkVirtual(virNetworkDriverStatePtr driver,
|
||||
return 0;
|
||||
|
||||
err5:
|
||||
virErrorPreserveLast(&save_err);
|
||||
if (def->bandwidth)
|
||||
virNetDevBandwidthClear(def->bridge);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user