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 -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220120112828.8D8E61C188D%40moolenaar.net.

Raspunde prin e-mail lui