From 804cacbea35bd0989fa290d4dad9fa65efc71346 Mon Sep 17 00:00:00 2001 From: Fred Klassen Date: Tue, 4 Jun 2024 20:45:23 -0700 Subject: [PATCH] Bug #867 - run regfree() on close --- docs/CHANGELOG | 1 + src/tcpprep.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 7d8680b3..87dd4964 100644 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -1,4 +1,5 @@ 06/03/2024 Version 4.5.0-beta1 + - memory leak in tcpprep when using RegEx (#867) - fix nansecond timestamp regression bug (#863) - autotools - AC_HELP_STRING is obsolete in 2.70 (#856) - configure.ac: do not run conftest in case of cross compilation (#849) diff --git a/src/tcpprep.c b/src/tcpprep.c index 83824766..6a5f7830 100644 --- a/src/tcpprep.c +++ b/src/tcpprep.c @@ -195,6 +195,8 @@ main(int argc, char *argv[]) /* close cache file */ close(out_file); + regfree(&tcpprep->options->preg); + tcpprep_close(tcpprep); restore_stdin();