aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoremanuele-f <faranda@ntop.org>2019-12-04 18:36:54 +0100
committeremanuele-f <faranda@ntop.org>2019-12-04 18:36:54 +0100
commitd37b69ce9c9caa979de7c511e33cb7d1cf5fbc91 (patch)
tree5395d1b466e428e2516f0bb1d82cf8716b94a9a6 /src
parent226a9abf2235fd9e87353ffe727babad71fb7274 (diff)
Fix corner case causing access to already freed memory
Diffstat (limited to 'src')
-rw-r--r--src/lib/ndpi_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 18173d555..e31237980 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -4702,7 +4702,7 @@ ndpi_protocol ndpi_detection_process_packet(struct ndpi_detection_module_struct
ndpi_process_extra_packet(ndpi_str, flow, packet, packetlen, current_tick_l, src, dst);
/* Update in case of new match */
ret.master_protocol = flow->detected_protocol_stack[1], ret.app_protocol = flow->detected_protocol_stack[0], ret.category = flow->category;;
- return(ret);
+ goto invalidate_ptr;
} else
goto ret_protocols;
}