diff options
author | Dave Barach <dave@barachs.net> | 2020-02-12 14:42:57 -0500 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-02-13 13:35:37 +0000 |
commit | af9c2a34353dd190eacce35741e194b7d1437ca1 (patch) | |
tree | fabc7635e9e81ed34aa6fd42ab444c298bb774a0 /src | |
parent | b01058ce2c79705b96aeba52e41ba986640020f0 (diff) |
classify: fix "show classify filter" debug CLI
Null pointer bug, memory leak. D'oh!
Type: fix
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ic2865757ed9cbb7f48d23c7c30b64299eb5f6674
(cherry picked from commit 104112f2d412a4576b5e0d3bbb20665d2b5bd615)
Diffstat (limited to 'src')
-rwxr-xr-x | src/vnet/classify/vnet_classify.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/vnet/classify/vnet_classify.c b/src/vnet/classify/vnet_classify.c index 5843c36f139..4dff82589dd 100755 --- a/src/vnet/classify/vnet_classify.c +++ b/src/vnet/classify/vnet_classify.c @@ -2074,7 +2074,6 @@ show_classify_filter_command_fn (vlib_main_t * vm, if (verbose) { - u8 *s = 0; u32 table_index; for (j = 0; j < vec_len (set->table_indices); j++) @@ -2091,8 +2090,7 @@ show_classify_filter_command_fn (vlib_main_t * vm, } else { - u8 *s = 0; - table_index = set->table_indices[0]; + table_index = set->table_indices ? set->table_indices[0] : ~0; if (table_index != ~0) s = format (s, " %u", table_index); |