changeset 34607:497db521aa84 v9.1.0195

patch 9.1.0195: memleak with ex_drop, NULL dereference Commit: https://github.com/vim/vim/commit/85a769d466d2009db6a318fd120d9691344664ba Author: Christian Brabandt <cb@256bit.org> Date: Thu Mar 21 20:19:00 2024 +0100 patch 9.1.0195: memleak with ex_drop, NULL dereference 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>
author Christian Brabandt <cb@256bit.org>
date Thu, 21 Mar 2024 20:30:03 +0100
parents f0380cf28880
children 75853631a1ce
files src/ex_cmds.c src/version.c
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;
 	}
     }
--- 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,