Patch 8.2.3942
Problem:    Coverity reports a possible memory leak.
Solution:   Free the array if allocation fails.
Files:      src/insexpand.c


*** ../vim-8.2.3941/src/insexpand.c     2021-12-29 17:38:42.301517624 +0000
--- src/insexpand.c     2021-12-30 10:28:30.564981775 +0000
***************
*** 3193,3198 ****
--- 3193,3200 ----
      num_matches = expand_spelling(lnum, compl_pattern, &matches);
      if (num_matches > 0)
        ins_compl_add_matches(num_matches, matches, p_ic);
+     else
+       vim_free(matches);
  #endif
  }
  
*** ../vim-8.2.3941/src/version.c       2021-12-29 19:41:42.446404689 +0000
--- src/version.c       2021-12-30 10:30:15.092671835 +0000
***************
*** 751,752 ****
--- 751,754 ----
  {   /* Add new patch number below this line */
+ /**/
+     3942,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
148. You find it easier to dial-up the National Weather Service
     Weather/your_town/now.html than to simply look out the window.

 /// 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/20211230103325.3B0BD1C0641%40moolenaar.net.

Raspunde prin e-mail lui