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>
return 0;
newMacsList = macsList;
- virStringListRemove(&macsList, mac);
- if (!macsList) {
+ virStringListRemove(&newMacsList, mac);
+ if (!newMacsList) {
virHashSteal(mgr->macs, domain);
} else {
if (macsList != newMacsList &&