diff options
author | Derrick Lyndon Pallas <derrick@argosylabs.com> | 2019-04-05 18:58:46 +0000 |
---|---|---|
committer | Derrick Lyndon Pallas <derrick@argosylabs.com> | 2019-04-05 19:00:39 +0000 |
commit | 85776a532d0d7785c6be844d8318efca31fc5dcd (patch) | |
tree | f62037b8991f9b4c1edd7612360d72c7f0c06f92 /src/lib/ndpi_main.c | |
parent | a455e0d8d48a479d5d43023316cb97cb012b78fa (diff) |
Fix double-strdup memory leak in ndpi_handle_rule
proto is being strdup'd both in the call to ndpi_set_proto_defaults and
inside of that function as well, leaking the memory.
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r-- | src/lib/ndpi_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index bdd28f666..e18c220a5 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -2837,7 +2837,7 @@ int ndpi_handle_rule(struct ndpi_detection_module_struct *ndpi_mod, ndpi_mod->ndpi_num_supported_protocols, 0 /* can_have_a_subprotocol */, no_master, no_master, - ndpi_strdup(proto), + proto, NDPI_PROTOCOL_CATEGORY_UNSPECIFIED, /* TODO add protocol category support in rules */ ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */, ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */); |