Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6b9ff54

Browse files
authored
fix(treesitter): free memory on removing parser (#19933)
This fixes the ASAN failure.
1 parentc545d51 commit6b9ff54

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎src/nvim/lua/treesitter.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,9 @@ int tslua_remove_lang(lua_State *L)
216216
constchar*lang_name=luaL_checkstring(L,1);
217217
boolpresent=pmap_has(cstr_t)(&langs,lang_name);
218218
if (present) {
219+
char*key= (char*)pmap_key(cstr_t)(&langs,lang_name);
219220
pmap_del(cstr_t)(&langs,lang_name);
221+
xfree(key);
220222
}
221223
lua_pushboolean(L,present);
222224
return1;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp