Problem: Coverity warns for :retab using freed memory.
Solution: Use the updated line pointer when moving text properties.
ptr = new_line + start_col;
for (col = 0; col < len; col++)
ptr[col] = (col < num_tabs) ? '\t' : ' ';
- ml_replace(lnum, new_line, FALSE);
+ if (ml_replace(lnum, new_line, FALSE) == OK)
+ // "new_line" may have been copied
+ new_line = curbuf->b_ml.ml_line_ptr;
if (first_line == 0)
first_line = lnum;
last_line = lnum;
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2458,
/**/
2457,
/**/