patch 8.1.0581: double free without the text properties feature
Problem: Double free without the text properties feature.
Solution: Reset the dirty flag.
diff --git a/src/memline.c b/src/memline.c
index 59e4502..0eb31c3 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -3176,9 +3176,9 @@
{
// another line is buffered, flush it
ml_flush_line(curbuf);
+ curbuf->b_ml.ml_flags &= ~ML_LINE_DIRTY;
#ifdef FEAT_TEXT_PROP
- curbuf->b_ml.ml_flags &= ~ML_LINE_DIRTY;
if (has_any_text_properties(curbuf))
// Need to fetch the old line to copy over any text properties.
ml_get_buf(curbuf, lnum, TRUE);