提交 4f5e32d3 编写于 作者: J John Ferlan

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: NJohn Ferlan <jferlan@redhat.com>
上级 f4adeae0
......@@ -125,8 +125,8 @@ virNetworkObjSetMacMap(virNetworkObjPtr obj,
void
virNetworkObjUnrefMacMap(virNetworkObjPtr obj)
{
if (!virObjectUnref(obj->macmap))
obj->macmap = NULL;
virObjectUnref(obj->macmap);
obj->macmap = NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册