Free pcre study structs for classification, threshold and reference parsing.

remotes/origin/master
Victor Julien 13 years ago
parent 0c24bbab0c
commit 988f22ee2e

@ -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;
}

@ -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;
}

@ -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;
}

Loading…
Cancel
Save