ndpi: no detection module needed to parse risks

ndpi_code2risk() does not need a detection module, yet one was
created, finalized and destroyed for every ndpi-risk keyword.

Ticket: 8077
pull/16354/head
TripleA150 1 month ago
parent da7c5b409f
commit 8089777894

@ -404,15 +404,9 @@ static int DetectnDPIRiskPacketMatch(
static DetectnDPIRiskData *DetectnDPIRiskParse(const char *arg, bool negate)
{
DetectnDPIRiskData *data;
struct ndpi_detection_module_struct *ndpi_struct;
ndpi_risk risk_mask;
/* convert list of risk names (string) to mask */
ndpi_struct = NdpiModuleNew();
if (unlikely(ndpi_struct == NULL))
return NULL;
ndpi_exit_detection_module(ndpi_struct);
if (isdigit(arg[0]))
risk_mask = atoll(arg);
else {

Loading…
Cancel
Save