summaryrefslogtreecommitdiffstats
path: root/src/vlibapi/api_shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlibapi/api_shared.c')
-rw-r--r--src/vlibapi/api_shared.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vlibapi/api_shared.c b/src/vlibapi/api_shared.c
index ce7c4aec712..6849ab0783c 100644
--- a/src/vlibapi/api_shared.c
+++ b/src/vlibapi/api_shared.c
@@ -595,7 +595,7 @@ vl_msg_api_handler_with_vm_node (api_main_t * am,
* Special-case, so we can e.g. bounce messages off the vnet
* main thread without copying them...
*/
- if (!(am->message_bounce[id]))
+ if (id >= vec_len (am->message_bounce) || !(am->message_bounce[id]))
vl_msg_api_free (the_msg);
if (PREDICT_FALSE (am->elog_trace_api_messages))