mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
9432ac70b2
commit
5b86f9aa1c
@ -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]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user