From ab037e2c828db757811b2f91f45b7b64dfb934a1 Mon Sep 17 00:00:00 2001 From: pengtian Date: Tue, 29 Dec 2020 21:41:41 +0800 Subject: Bugfix for host check (#1097) this bug is from commit `427002d14` `2020-05-06 00:31:40` --- src/lib/ndpi_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/ndpi_main.c') diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 6990882aa..a2fe4c3c8 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -4324,7 +4324,7 @@ int ndpi_load_hostname_category(struct ndpi_detection_module_struct *ndpi_str, c memset(&ac_pattern, 0, sizeof(ac_pattern)); if(ndpi_str->custom_categories.hostnames_shadow.ac_automa == NULL) { - free(name); + ndpi_free(name); return(-1); } @@ -4333,12 +4333,12 @@ int ndpi_load_hostname_category(struct ndpi_detection_module_struct *ndpi_str, c rc = ac_automata_add(ndpi_str->custom_categories.hostnames_shadow.ac_automa, &ac_pattern); if(rc != ACERR_DUPLICATE_PATTERN && rc != ACERR_SUCCESS) { - free(name); + ndpi_free(name); return(-1); } if(rc == ACERR_DUPLICATE_PATTERN) - free(name); + ndpi_free(name); return(0); } -- cgit v1.2.3