TSG-15278 bugfix: memleak
This commit is contained in:
@@ -1048,16 +1048,18 @@ static void handle_inject_packet(marsio_buff_t *rx_buff, struct thread_ctx *thre
|
||||
struct g_vxlan *g_vxlan_hdr = NULL;
|
||||
struct session_ctx *session_ctx = NULL;
|
||||
struct selected_chaining *chaining = NULL;
|
||||
memset(&meta, 0, sizeof(struct metadata));
|
||||
|
||||
int sf_index = 0;
|
||||
int raw_len = marsio_buff_datalen(rx_buff);
|
||||
char *raw_data = marsio_buff_mtod(rx_buff);
|
||||
if (g_vxlan_decode(&g_vxlan_hdr, raw_data, raw_len) == -1)
|
||||
{
|
||||
goto error_block;
|
||||
throughput_metrics_inc(&(g_metrics->device.endpoint_drop), 1, raw_len);
|
||||
action_err_block(rx_buff, &meta, NULL, thread_ctx);
|
||||
return;
|
||||
}
|
||||
|
||||
memset(&meta, 0, sizeof(struct metadata));
|
||||
meta.raw_data = (char *)g_vxlan_hdr + sizeof(struct g_vxlan);
|
||||
meta.raw_len = raw_len - sizeof(struct ethhdr) - sizeof(struct ip) - sizeof(struct udp_hdr) - sizeof(struct g_vxlan);
|
||||
meta.l7offset = 0;
|
||||
|
||||
Reference in New Issue
Block a user