Patch 8.2.4150

3 views
Skip to first unread message

Bram Moolenaar

unread,
Jan 20, 2022, 6:28:34 AM1/20/22
to vim...@googlegroups.com

Patch 8.2.4150
Problem: Coverity warns for using pointer after free.
Solution: Swap statements, even though using the pointer is no problem.
Files: src/map.c


*** ../vim-8.2.4149/src/map.c 2022-01-19 22:51:44.221691640 +0000
--- src/map.c 2022-01-20 11:26:12.368551749 +0000
***************
*** 84,93 ****
vim_free(mp->m_str);
vim_free(mp->m_orig_str);
*mpp = mp->m_next;
- vim_free(mp);
#ifdef FEAT_EVAL
reset_last_used_map(mp);
#endif
}

/*
--- 84,93 ----
vim_free(mp->m_str);
vim_free(mp->m_orig_str);
*mpp = mp->m_next;
#ifdef FEAT_EVAL
reset_last_used_map(mp);
#endif
+ vim_free(mp);
}

/*
*** ../vim-8.2.4149/src/version.c 2022-01-20 11:17:14.552366205 +0000
--- src/version.c 2022-01-20 11:27:27.898937294 +0000
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 4150,
/**/

--
It's not hard to meet expenses, they're everywhere.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages