diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..e7068ebd95 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,15 @@ +name: Manual Inputs +on: + workflow_dispatch: + inputs: + version: + description: Bump Version + default: v1.0.0 + required: true +jobs: + bump-version: + name: Bump Package Version + runs-on: ubuntu-latest + steps: + - name: Example variable usage + run: git tag ${{ github.event.inputs.version }} \ No newline at end of file diff --git a/CHANGES b/CHANGES index 8404e18288..f5e608c938 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,8 @@ v3.x.y - YYYY-MMM-DD (to be released) ------------------------------------- + - Fix memory leak in ValidateSchema + [#2469 - @martinhsv] - Using a custom VariableMatch* implementation [#2428 - @zimmerle] - Avoids to cleanup GeoIp on ModSecurity destructor diff --git a/src/operators/validate_schema.cc b/src/operators/validate_schema.cc index 65b471703d..55dde8a42a 100644 --- a/src/operators/validate_schema.cc +++ b/src/operators/validate_schema.cc @@ -82,6 +82,10 @@ bool ValidateSchema::evaluate(Transaction *transaction, return true; } + if (m_validCtx != NULL) { + xmlSchemaFreeValidCtxt(m_validCtx); + m_validCtx = NULL; + } m_validCtx = xmlSchemaNewValidCtxt(m_schema); if (m_validCtx == NULL) { std::stringstream err("XML: Failed to create validation context.");