aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/ex_docmd.c5
-rw-r--r--src/nvim/version.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index dfae2b849d..eb8fee97f2 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -9387,17 +9387,20 @@ static void ex_match(exarg_T *eap)
g = vim_strnsave(eap->arg, (int)(p - eap->arg));
p = skipwhite(p);
if (*p == NUL) {
- /* There must be two arguments. */
+ // There must be two arguments.
+ xfree(g);
EMSG2(_(e_invarg2), eap->arg);
return;
}
end = skip_regexp(p + 1, *p, TRUE, NULL);
if (!eap->skip) {
if (*end != NUL && !ends_excmd(*skipwhite(end + 1))) {
+ xfree(g);
eap->errmsg = e_trailing;
return;
}
if (*end != *p) {
+ xfree(g);
EMSG2(_(e_invarg2), p);
return;
}
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 7d4b8982cd..3d7077e777 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -351,7 +351,7 @@ static int included_patches[] = {
// 942,
// 941,
// 940 NA
- // 939,
+ 939,
// 938 NA
// 937,
// 936,