From ed1c1835043a1d266a5928c40f41b340f6c968d7 Mon Sep 17 00:00:00 2001 From: Pavel Kotucek Date: Tue, 22 Nov 2016 09:15:01 +0100 Subject: Fix issues reported by coverity Signed-off-by: Pavel Kotucek Change-Id: I5d8c542fd283f86c325200f3caab56294393cedf --- vpp/vpp-api/api.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vpp/vpp-api/api.c b/vpp/vpp-api/api.c index ad5d43be..330b9159 100644 --- a/vpp/vpp-api/api.c +++ b/vpp/vpp-api/api.c @@ -8628,6 +8628,9 @@ vl_api_sw_interface_span_dump_t_handler (vl_api_sw_interface_span_dump_t * mp) u32 src_sw_if_index = 0, *dst_sw_if_index; q = vl_api_client_index_to_input_queue (mp->client_index); + if (!q) + return; + vec_foreach (dst_sw_if_index, sm->dst_by_src_sw_if_index) { if (*dst_sw_if_index > 0) @@ -9184,7 +9187,6 @@ vl_api_feature_enable_disable_t_handler (vl_api_feature_enable_disable_t * mp) u8 *arc_name = format (0, "%s%c", mp->arc_name, 0); u8 *feature_name = format (0, "%s%c", mp->feature_name, 0); - u32 sw_if_index = ntohl (mp->sw_if_index); vnet_feature_registration_t *reg; reg = @@ -9194,8 +9196,10 @@ vl_api_feature_enable_disable_t_handler (vl_api_feature_enable_disable_t * mp) rv = VNET_API_ERROR_INVALID_VALUE; else { + u32 sw_if_index; clib_error_t *error = 0; + sw_if_index = ntohl (mp->sw_if_index); if (reg->enable_disable_cb) error = reg->enable_disable_cb (sw_if_index, mp->enable); if (!error) -- cgit 1.2.3-korg