[libvirt PATCH 09/10] virNWFilterBuildAll: `virHashNew` cannot return NULL

Tim Wiederhake twiederh at redhat.com
Tue Jul 13 14:44:40 UTC 2021


Signed-off-by: Tim Wiederhake <twiederh at redhat.com>
---
 src/nwfilter/nwfilter_gentech_driver.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/nwfilter/nwfilter_gentech_driver.c b/src/nwfilter/nwfilter_gentech_driver.c
index 8aa1db23d3..da4f71daf1 100644
--- a/src/nwfilter/nwfilter_gentech_driver.c
+++ b/src/nwfilter/nwfilter_gentech_driver.c
@@ -1007,8 +1007,7 @@ virNWFilterBuildAll(virNWFilterDriverState *driver,
     VIR_DEBUG("Build all filters newFilters=%d", newFilters);
 
     if (newFilters) {
-        if (!(data.skipInterfaces = virHashNew(NULL)))
-            return -1;
+        data.skipInterfaces = virHashNew(NULL);
 
         data.step = STEP_APPLY_NEW;
         if (virNWFilterBindingObjListForEach(driver->bindings,
-- 
2.31.1




More information about the libvir-list mailing list