mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-13 06:34:42 -05: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:
@@ -125,8 +125,8 @@ virNetworkObjSetMacMap(virNetworkObjPtr obj,
|
||||
void
|
||||
virNetworkObjUnrefMacMap(virNetworkObjPtr obj)
|
||||
{
|
||||
if (!virObjectUnref(obj->macmap))
|
||||
obj->macmap = NULL;
|
||||
virObjectUnref(obj->macmap);
|
||||
obj->macmap = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user