From 5b86f9aa1c2f066f9ec56dd482fcbf74bfd273e1 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Mon, 23 Feb 2015 16:19:54 +0100 Subject: [PATCH] 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 --- src/conf/network_conf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 154a9bc7a2..9734a7f862 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -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]); -- 2.39.5