mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
virmacmap: Fix variable handling
In virMacMapRemoveLocked() we have two variables: @macsList and @newMacsList. Obviously, @newMacsList is supposed to hold pointer to modified list but in fact it holds pointer to the old list. It's confusing. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
fbd717c389
commit
806582a5d1
@ -121,8 +121,8 @@ virMacMapRemoveLocked(virMacMapPtr mgr,
|
||||
return 0;
|
||||
|
||||
newMacsList = macsList;
|
||||
virStringListRemove(&macsList, mac);
|
||||
if (!macsList) {
|
||||
virStringListRemove(&newMacsList, mac);
|
||||
if (!newMacsList) {
|
||||
virHashSteal(mgr->macs, domain);
|
||||
} else {
|
||||
if (macsList != newMacsList &&
|
||||
|
Loading…
Reference in New Issue
Block a user