Possible leak fix

This commit is contained in:
emanuele-f 2019-11-19 11:41:27 +01:00
parent 3754e6dd12
commit 0b819badd2

View file

@ -316,6 +316,9 @@ void ndpi_set_proto_defaults(struct ndpi_detection_module_struct *ndpi_str,
name = ndpi_strdup(protoName);
if(ndpi_str->proto_defaults[protoId].protoName)
ndpi_free(ndpi_str->proto_defaults[protoId].protoName);
ndpi_str->proto_defaults[protoId].protoName = name,
ndpi_str->proto_defaults[protoId].protoCategory = protoCategory,
ndpi_str->proto_defaults[protoId].protoId = protoId,