From: Victor Julien Date: Thu, 28 Jun 2012 10:50:08 +0000 (+0200) Subject: Free pcre study structs for classification, threshold and reference parsing. X-Git-Tag: suricata-1.3rc1~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=988f22ee2e4f7f8325ee795015388adf0a6d254d;p=thirdparty%2Fsuricata.git Free pcre study structs for classification, threshold and reference parsing. --- diff --git a/src/util-classification-config.c b/src/util-classification-config.c index d9d5e54e3c..6300844c4b 100644 --- a/src/util-classification-config.c +++ b/src/util-classification-config.c @@ -128,7 +128,7 @@ int SCClassConfInitContextAndLocalResources(DetectEngineCtx *de_ctx) regex = NULL; } if (regex_study != NULL) { - //pcre_free_study(regex_study); + pcre_free(regex_study); regex_study = NULL; } @@ -166,11 +166,11 @@ static void SCClassConfDeInitLocalResources(DetectEngineCtx *de_ctx) default_file_path = SC_CLASS_CONF_DEF_CONF_FILEPATH; fd = NULL; if (regex != NULL) { - pcre_free(regex_study); + pcre_free(regex); regex = NULL; } if (regex_study != NULL) { - //pcre_free_study(regex_study); + pcre_free(regex_study); regex_study = NULL; } diff --git a/src/util-reference-config.c b/src/util-reference-config.c index 989f9b5a1a..94a8db8c99 100644 --- a/src/util-reference-config.c +++ b/src/util-reference-config.c @@ -129,7 +129,7 @@ static int SCRConfInitContextAndLocalResources(DetectEngineCtx *de_ctx) regex = NULL; } if (regex_study != NULL) { - //pcre_free_study(regex_study); + pcre_free(regex_study); regex_study = NULL; } @@ -168,7 +168,7 @@ static void SCRConfDeInitLocalResources(DetectEngineCtx *de_ctx) regex = NULL; } if (regex_study != NULL) { - //pcre_free_study(regex_study); + pcre_free(regex_study); regex_study = NULL; } diff --git a/src/util-threshold-config.c b/src/util-threshold-config.c index 47a4c35c7f..084ea587ba 100644 --- a/src/util-threshold-config.c +++ b/src/util-threshold-config.c @@ -216,7 +216,7 @@ void SCThresholdConfDeInitContext(DetectEngineCtx *de_ctx, FILE *fd) regex_base = NULL; } if (regex_base_study != NULL) { - //pcre_free_study(regex_base_study); + pcre_free(regex_base_study); regex_base_study = NULL; } @@ -225,7 +225,7 @@ void SCThresholdConfDeInitContext(DetectEngineCtx *de_ctx, FILE *fd) regex_threshold = NULL; } if (regex_threshold_study != NULL) { - //pcre_free_study(regex_threshold_study); + pcre_free(regex_threshold_study); regex_threshold_study = NULL; } @@ -234,7 +234,7 @@ void SCThresholdConfDeInitContext(DetectEngineCtx *de_ctx, FILE *fd) regex_rate = NULL; } if (regex_rate_study != NULL) { - //pcre_free_study(regex_rate_study); + pcre_free(regex_rate_study); regex_rate_study = NULL; } @@ -243,7 +243,7 @@ void SCThresholdConfDeInitContext(DetectEngineCtx *de_ctx, FILE *fd) regex_suppress = NULL; } if (regex_suppress_study != NULL) { - //pcre_free_study(regex_suppress_study); + pcre_free(regex_suppress_study); regex_suppress_study = NULL; }