forked from aniani/vim
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
@@ -704,6 +704,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
195,
|
||||
/**/
|
||||
194,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user