Patch 8.2.3927
Problem:    Vim9: double free when using lambda.
Solution:   Don't free both cmdline and line_to_free.
Files:      src/userfunc.c


*** ../vim-8.2.3926/src/userfunc.c      2021-12-28 17:55:22.963786520 +0000
--- src/userfunc.c      2021-12-28 20:13:32.463720698 +0000
***************
*** 1146,1152 ****
      ga_init2(&newlines, (int)sizeof(char_u *), 10);
      if (get_function_body(&eap, &newlines, NULL, &line_to_free) == FAIL)
      {
!       vim_free(cmdline);
        goto erret;
      }
  
--- 1146,1153 ----
      ga_init2(&newlines, (int)sizeof(char_u *), 10);
      if (get_function_body(&eap, &newlines, NULL, &line_to_free) == FAIL)
      {
!       if (cmdline != line_to_free)
!           vim_free(cmdline);
        goto erret;
      }
  
*** ../vim-8.2.3926/src/version.c       2021-12-28 20:03:38.980797969 +0000
--- src/version.c       2021-12-28 20:18:34.763023710 +0000
***************
*** 751,752 ****
--- 751,754 ----
  {   /* Add new patch number below this line */
+ /**/
+     3927,
  /**/

-- 
In a world without fences, who needs Gates and Windows?

 /// 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/20211228201915.AF6BB1C0641%40moolenaar.net.

Raspunde prin e-mail lui