ipfix-export: don't check the result of pool_get 04/34604/2
authorPaul Atkins <patkins@graphiant.com>
Tue, 23 Nov 2021 10:51:07 +0000 (10:51 +0000)
committerNeale Ranns <neale@graphiant.com>
Mon, 29 Nov 2021 16:21:27 +0000 (16:21 +0000)
The code to check the exp is set after the call to pool_get()
is marked as unreachable in coverity. This is becasue if it
fails in pool_get then the it panics. Remove the unreachable code.

Type: fix
Signed-off-by: Paul Atkins <patkins@graphiant.com>
Change-Id: Iabb51b6b6788b6c12ef37c28dde2118c798de831

src/vnet/ipfix-export/flow_api.c

index 4a9b525..0b28733 100644 (file)
@@ -107,8 +107,6 @@ vl_api_set_ipfix_exporter_t_internal (
              if (pool_elts (frm->exporters) >= IPFIX_EXPORTERS_MAX)
                return VNET_API_ERROR_INVALID_VALUE;
              pool_get (frm->exporters, exp);
-             if (!exp)
-               return VNET_API_ERROR_INVALID_VALUE;
            }
        }
       else