diff options
Diffstat (limited to 'src/nvim/lua/treesitter.c')
-rw-r--r-- | src/nvim/lua/treesitter.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/lua/treesitter.c b/src/nvim/lua/treesitter.c index 8b47939169..954c3410d3 100644 --- a/src/nvim/lua/treesitter.c +++ b/src/nvim/lua/treesitter.c @@ -216,7 +216,9 @@ int tslua_remove_lang(lua_State *L) const char *lang_name = luaL_checkstring(L, 1); bool present = pmap_has(cstr_t)(&langs, lang_name); if (present) { + char *key = (char *)pmap_key(cstr_t)(&langs, lang_name); pmap_del(cstr_t)(&langs, lang_name); + xfree(key); } lua_pushboolean(L, present); return 1; |