diff options
author | pengtian <pengtianabc@hotmail.com> | 2020-12-29 21:41:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-29 14:41:41 +0100 |
commit | ab037e2c828db757811b2f91f45b7b64dfb934a1 (patch) | |
tree | a99a4cfcf8f31adb383c7e8f91b62c5927f3f2c7 /src | |
parent | 84132c6735935ce494a665557dcbabfd2703b036 (diff) |
Bugfix for host check (#1097)
this bug is from commit `427002d14` `2020-05-06 00:31:40`
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/ndpi_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); } |