From 5e76fe99976c521797eb3bda62ed22949689eabd Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Sun, 12 May 2002 20:54:16 +0000 Subject: [PATCH] Add same regfree call to color.c:update_color() git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1208 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 3 +++ color.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index e7392b33..1274263a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -33,6 +33,9 @@ CVS code - (David Benbennick). - Move next_key and pev_key definitions out of main() and into global.c where they belong (David Benbennick). +- color.c: + update_color() + - Add regfree call here to avoid memory leaks. - configure.ac: - Define NDEBUG to silence asserts (David Benbennick). - files.c: diff --git a/color.c b/color.c index 6766ad0a..6edcb557 100644 --- a/color.c +++ b/color.c @@ -191,6 +191,8 @@ void update_color(void) /* Set colorstrings if we matched the extension regex */ if (!regexec(&syntaxfile_regexp, filename, 1, synfilematches, 0)) colorstrings = tmpsyntax->color; + + regfree(&syntaxfile_regexp); } } -- 2.39.5