diff options
author | Felix Jia <felix.jia@alliedtelesis.co.nz> | 2018-03-24 12:11:54 +1300 |
---|---|---|
committer | Felix Jia <felix.jia@alliedtelesis.co.nz> | 2018-03-26 10:20:03 +1300 |
commit | 5281fcf3cd76b74ca2779f553ecc4cc9fdc1406a (patch) | |
tree | 3f1b595a4eac00a55af8ef40becae3061d9b91a7 /src | |
parent | 462da90a21d7a73fe9122b759c6b40bebfefc6e8 (diff) |
Fixed memory leak when flow is zeroed out.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/ndpi_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 430f25781..76ec13af0 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -3275,6 +3275,10 @@ static int ndpi_init_packet_header(struct ndpi_detection_module_struct *ndpi_str && flow->packet.tcp->ack == 0 && flow->init_finished != 0 && flow->detected_protocol_stack[0] == NDPI_PROTOCOL_UNKNOWN) { + if(flow->http.url) + ndpi_free(flow->http.url); + if(flow->http.content_type) + ndpi_free(flow->http.content_type); memset(flow, 0, sizeof(*(flow))); NDPI_LOG_DBG(ndpi_struct, |