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
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user