提交 5b86f9aa 编写于 作者: M Michal Privoznik

virNetworkObjListFree: Accept NULL

All of our vir*Free() functions should accept NULL, even though
that there's no way of actually passing NULL with current code.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 9432ac70
...@@ -279,6 +279,9 @@ void virNetworkObjListFree(virNetworkObjListPtr nets) ...@@ -279,6 +279,9 @@ void virNetworkObjListFree(virNetworkObjListPtr nets)
{ {
size_t i; size_t i;
if (!nets)
return;
for (i = 0; i < nets->count; i++) for (i = 0; i < nets->count; i++)
virNetworkObjFree(nets->objs[i]); virNetworkObjFree(nets->objs[i]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册