mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
network: Unconditionally initialize macmap when stopping virtual network
Since we can only ever have one reference to obj->macmap, rather than only clearing obj->macmap during virNetworkObjUnrefMacMap (e.g. virtual network from networkShutdownNetwork), let's just unconditionally clear the obj->macmap to ensure that some future change that created it's own reference to obj->macmap wouldn't have that reference disappear if virNetworkObjDispose got called. Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
f4adeae09d
commit
4f5e32d305
@ -125,8 +125,8 @@ virNetworkObjSetMacMap(virNetworkObjPtr obj,
|
||||
void
|
||||
virNetworkObjUnrefMacMap(virNetworkObjPtr obj)
|
||||
{
|
||||
if (!virObjectUnref(obj->macmap))
|
||||
obj->macmap = NULL;
|
||||
virObjectUnref(obj->macmap);
|
||||
obj->macmap = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user