Patch 8.1.1010
Problem:    Lua interface leaks memory.
Solution:   Clear typeval after copying it.
Files:      src/if_lua.c


*** ../vim-8.1.1009/src/if_lua.c        2019-02-17 17:44:36.211875510 +0100
--- src/if_lua.c        2019-03-16 16:37:33.641028413 +0100
***************
*** 844,853 ****
      lua_settop(L, 2);
      luaV_checktypval(L, 2, &v, "adding list item");
      if (list_append_tv(l, &v) == FAIL)
-     {
-       clear_tv(&v);
        luaL_error(L, "failed to add item to list");
-     }
      clear_tv(&v);
      lua_settop(L, 1);
      return 1;
--- 844,850 ----
***************
*** 872,881 ****
      lua_settop(L, 2);
      luaV_checktypval(L, 2, &v, "inserting list item");
      if (list_insert_tv(l, &v, li) == FAIL)
-     {
-       clear_tv(&v);
        luaL_error(L, "failed to add item to list");
-     }
      clear_tv(&v);
      lua_settop(L, 1);
      return 1;
--- 869,875 ----
***************
*** 981,986 ****
--- 975,981 ----
      char_u *key = (char_u *) luaL_checkstring(L, 2);
      dictitem_T *di;
      typval_T v;
+ 
      if (d->dv_lock)
        luaL_error(L, "dict is locked");
      if (key == NULL)
***************
*** 1104,1109 ****
--- 1099,1105 ----
        {
            luaV_checktypval(L, i + 2, &v, "calling funcref");
            list_append_tv(f->args.vval.v_list, &v);
+           clear_tv(&v);
        }
        status = func_call(f->tv.vval.v_string, &f->args,
                                                        NULL, f->self, &rettv);
***************
*** 1571,1576 ****
--- 1567,1573 ----
                {
                    luaV_checktypval(L, -1, &v, "vim.list");
                    list_append_tv(l, &v);
+                   clear_tv(&v);
                }
                lua_pop(L, 1); /* value */
            } while (notnil);
*** ../vim-8.1.1009/src/version.c       2019-03-16 15:24:39.333662581 +0100
--- src/version.c       2019-03-16 16:38:26.984716746 +0100
***************
*** 781,782 ****
--- 781,784 ----
  {   /* Add new patch number below this line */
+ /**/
+     1010,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
66. You create a homepage with the impression to cure the afflicted...but
    your hidden agenda is to receive more e-mail.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui