Fix missing strdup on ndpi_load_hostname_category

This commit is contained in:
emanuele-f
2019-09-27 12:09:51 +02:00
parent 277b4a060a
commit 5099646938
+4 -2
View File
@@ -1902,9 +1902,11 @@ static void setupDetection(u_int16_t thread_id, pcap_t * pcap_handle) {
if(sscanf(name, "%d.%d.%d.%d", &fields[0], &fields[1], &fields[2], &fields[3]) == 4)
ndpi_load_ip_category(ndpi_thread_info[thread_id].workflow->ndpi_struct,
name, (ndpi_protocol_category_t)atoi(category));
else
else {
/* TODO free the strdup */
ndpi_load_hostname_category(ndpi_thread_info[thread_id].workflow->ndpi_struct,
name, (ndpi_protocol_category_t)atoi(category));
strdup(name), (ndpi_protocol_category_t)atoi(category));
}
}
}
}