summaryrefslogtreecommitdiff
path: root/src/regexp.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-06-25 23:04:51 +0000
committerBram Moolenaar <Bram@vim.org>2005-06-25 23:04:51 +0000
commitf461c8e7f8ce2fd2ac3367680ec4c540f04ab259 (patch)
treebfacc7b1f4c7b6087026c9e8c39bb1f7b305d22f /src/regexp.c
parentea408854a8360b6925122ce7709b424ab3005209 (diff)
downloadvim-git-f461c8e7f8ce2fd2ac3367680ec4c540f04ab259.tar.gz
updated for version 7.0093v7.0093
Diffstat (limited to 'src/regexp.c')
-rw-r--r--src/regexp.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/regexp.c b/src/regexp.c
index bc13b38ea..dd0b1530a 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -373,7 +373,15 @@ re_multi_type(c)
*/
#define JUST_CALC_SIZE ((char_u *) -1)
-static char_u *reg_prev_sub;
+static char_u *reg_prev_sub = NULL;
+
+#if defined(EXITFREE) || defined(PROTO)
+ void
+free_regexp_stuff()
+{
+ vim_free(reg_prev_sub);
+}
+#endif
/*
* REGEXP_INRANGE contains all characters which are always special in a []
@@ -1700,7 +1708,7 @@ regatom(flagp)
/* NOTREACHED */
case Magic('~'): /* previous substitute pattern */
- if (reg_prev_sub)
+ if (reg_prev_sub != NULL)
{
char_u *lp;