summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Brabandt <cb@256bit.org>2024-03-21 20:19:00 +0100
committerChristian Brabandt <cb@256bit.org>2024-03-21 20:19:00 +0100
commit85a769d466d2009db6a318fd120d9691344664ba (patch)
tree415b0f9d9c89f8c4c6c22241d39755d7585bf46f
parent9eb236f455df75af858a37a3d98f190c977deaf4 (diff)
patch 9.1.0195: memleak with ex_drop, NULL dereferencev9.1.0195
Problem: memleak with ex_drop(), NULL dereference (zeertzjq) Solution: revert back to ex_rewind(), use curbuf instead of buf fixes: #14246 closes: #14251 Signed-off-by: Christian Brabandt <cb@256bit.org>
-rw-r--r--src/ex_cmds.c4
-rw-r--r--src/version.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 2527476a25..864f89d43c 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -5503,8 +5503,8 @@ ex_drop(exarg_T *eap)
buf_check_timestamp(curbuf, FALSE);
curbuf->b_p_ar = save_ar;
}
- if (buf->b_ml.ml_flags & ML_EMPTY)
- open_buffer(FALSE, eap, 0);
+ if (curbuf->b_ml.ml_flags & ML_EMPTY)
+ ex_rewind(eap);
return;
}
}
diff --git a/src/version.c b/src/version.c
index 8a801686f9..bb2980b0b4 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 195,
+/**/
194,
/**/
193,