If the id is invalid we cannot check whether we must free the message or
not, free it anyway.
Type: fix
Change-Id: Ie4426f601390d1e5e14c739f670e8c1e6e3aaf1e
Signed-off-by: Benoît Ganne <bganne@cisco.com>
* 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))