From b2c8cb655c8d70dafe67bad8da8099a4e8c6a517 Mon Sep 17 00:00:00 2001 From: emanuele-f Date: Tue, 8 Oct 2019 10:12:41 +0200 Subject: ndpi_load_hostname_category now performs strdup on the name argument This simplifies the API as an application is not required to keep references to the strings to free --- example/ndpiReader.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'example/ndpiReader.c') diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 2a1bbd8bb..d44fae0d6 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -1903,9 +1903,8 @@ static void setupDetection(u_int16_t thread_id, pcap_t * pcap_handle) { ndpi_load_ip_category(ndpi_thread_info[thread_id].workflow->ndpi_struct, name, (ndpi_protocol_category_t)atoi(category)); else { - /* TODO free the strdup */ ndpi_load_hostname_category(ndpi_thread_info[thread_id].workflow->ndpi_struct, - strdup(name), (ndpi_protocol_category_t)atoi(category)); + name, (ndpi_protocol_category_t)atoi(category)); } } } -- cgit v1.2.3