提交 a39d97c7 编写于 作者: C Chen Gang 提交者: Stefan Hajnoczi

hw/net/xen_nic.c: Set 'netdev->mac' to NULL after free it

Since net_init() checks whether 'netdev->mac' is NULL, before alloc it;
net_release() also need set 'netdev->mac' to NULL after free it.
Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 d4685837
......@@ -428,6 +428,7 @@ static int net_free(struct XenDevice *xendev)
netdev->nic = NULL;
}
g_free(netdev->mac);
netdev->mac = NULL;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册