diff options
author | ZyX <kp-pav@yandex.ru> | 2017-01-21 00:16:25 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-03-27 00:12:22 +0300 |
commit | 45feaa73d0759858a9a4454037fe4a41ea97e5b9 (patch) | |
tree | 7e95dc4acf6fef8e5b7bcc6df60df708e8bc0dd6 /src/nvim/viml/executor/converter.c | |
parent | a3ea05c1e5965ca23b1b926c41b00597e9d0211c (diff) | |
download | rneovim-45feaa73d0759858a9a4454037fe4a41ea97e5b9.tar.gz rneovim-45feaa73d0759858a9a4454037fe4a41ea97e5b9.tar.bz2 rneovim-45feaa73d0759858a9a4454037fe4a41ea97e5b9.zip |
eval/decode: Fix memory leak in JSON functions
Diffstat (limited to 'src/nvim/viml/executor/converter.c')
-rw-r--r-- | src/nvim/viml/executor/converter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/viml/executor/converter.c b/src/nvim/viml/executor/converter.c index 316a5aa93f..a39f573036 100644 --- a/src/nvim/viml/executor/converter.c +++ b/src/nvim/viml/executor/converter.c @@ -210,7 +210,7 @@ bool nlua_pop_typval(lua_State *lstate, typval_T *ret_tv) list_T *const kv_pair = list_alloc(); list_append_list(cur.tv->vval.v_list, kv_pair); listitem_T *const key = listitem_alloc(); - key->li_tv = decode_string(s, len, kTrue, false); + key->li_tv = decode_string(s, len, kTrue, false, false); list_append(kv_pair, key); if (key->li_tv.v_type == VAR_UNKNOWN) { ret = false; @@ -268,7 +268,7 @@ bool nlua_pop_typval(lua_State *lstate, typval_T *ret_tv) case LUA_TSTRING: { size_t len; const char *s = lua_tolstring(lstate, -1, &len); - *cur.tv = decode_string(s, len, kNone, true); + *cur.tv = decode_string(s, len, kNone, true, false); if (cur.tv->v_type == VAR_UNKNOWN) { ret = false; } |