To: vim_dev@googlegroups.com Subject: Patch 8.2.4150 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@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 ///