diff options
author | Luca Deri <lucaderi@users.noreply.github.com> | 2018-04-16 14:19:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-16 14:19:00 +0200 |
commit | c9a2eb54c1822cb90dcb9ca3dd8242f20a0ea6ae (patch) | |
tree | 458f62fbef5832d4b0fda4e5caf2fedbbdcbe8e9 /src | |
parent | 8a59581668047ec0a8c9d5ed778476c398ab7f89 (diff) | |
parent | 5281fcf3cd76b74ca2779f553ecc4cc9fdc1406a (diff) |
Merge pull request #539 from felix-jia/fix-mem-leak
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 a8af223d8..2b5ade95f 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -3277,6 +3277,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, |