diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-04-12 12:18:49 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-04-12 12:18:49 +0200 |
commit | 644cf03b7ec4c75c695de17286b3a99dd53184dd (patch) | |
tree | 4b70d7986ac0b251f4e3dfdba73d66667a8df240 | |
parent | 126bdeeabe952f447b442b9af19a6df38b719325 (diff) | |
download | vim-644cf03b7ec4c75c695de17286b3a99dd53184dd.zip |
updated for version 7.3.885
Problem: Double free for list and dict in Lua. (Shougo Matsu)
Solution: Do not unref list and dict. (Yasuhiro Matsumoto)
-rw-r--r-- | src/if_lua.c | 16 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 2 insertions, 16 deletions
diff --git a/src/if_lua.c b/src/if_lua.c index 1458593b1..0d1d08e2b 100644 --- a/src/if_lua.c +++ b/src/if_lua.c @@ -665,13 +665,6 @@ luaV_pushtype(list_T, list, luaV_List) luaV_type_tostring(list, LUAVIM_LIST) static int -luaV_list_gc (lua_State *L) -{ - list_unref(luaV_unbox(L, luaV_List, 1)); - return 0; -} - - static int luaV_list_len (lua_State *L) { list_T *l = luaV_unbox(L, luaV_List, 1); @@ -801,7 +794,6 @@ luaV_list_insert (lua_State *L) static const luaL_Reg luaV_List_mt[] = { {"__tostring", luaV_list_tostring}, - {"__gc", luaV_list_gc}, {"__len", luaV_list_len}, {"__call", luaV_list_call}, {"__index", luaV_list_index}, @@ -830,13 +822,6 @@ luaV_pushtype(dict_T, dict, luaV_Dict) luaV_type_tostring(dict, LUAVIM_DICT) static int -luaV_dict_gc (lua_State *L) -{ - dict_unref(luaV_unbox(L, luaV_Dict, 1)); - return 0; -} - - static int luaV_dict_len (lua_State *L) { dict_T *d = luaV_unbox(L, luaV_Dict, 1); @@ -929,7 +914,6 @@ luaV_dict_newindex (lua_State *L) static const luaL_Reg luaV_Dict_mt[] = { {"__tostring", luaV_dict_tostring}, - {"__gc", luaV_dict_gc}, {"__len", luaV_dict_len}, {"__call", luaV_dict_call}, {"__index", luaV_dict_index}, diff --git a/src/version.c b/src/version.c index 71a96b40a..8acd839c9 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 885, +/**/ 884, /**/ 883, |