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:
Michal Privoznik 2015-02-23 16:19:54 +01:00
parent 9432ac70b2
commit 5b86f9aa1c
1 changed files with 3 additions and 0 deletions

View File

@ -279,6 +279,9 @@ void virNetworkObjListFree(virNetworkObjListPtr nets)
{
size_t i;
if (!nets)
return;
for (i = 0; i < nets->count; i++)
virNetworkObjFree(nets->objs[i]);