Fix little leak on the proto_defaults strdup

This commit is contained in:
emanuele-f
2020-02-12 17:15:01 +01:00
parent 97fb50e837
commit 3fa61a394b
+1 -1
View File
@@ -2503,7 +2503,7 @@ void ndpi_exit_detection_module(struct ndpi_detection_module_struct *ndpi_str) {
if(ndpi_str != NULL) {
int i;
for(i=0; i<(int)ndpi_str->ndpi_num_supported_protocols; i++) {
for(i=0; i<(NDPI_MAX_SUPPORTED_PROTOCOLS+NDPI_MAX_NUM_CUSTOM_PROTOCOLS); i++) {
if(ndpi_str->proto_defaults[i].protoName)
ndpi_free(ndpi_str->proto_defaults[i].protoName);
}