Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commit c8dd0b7

Browse files
committed
fix(query): result from env->GetStringUTFChars is not release in TSQuery.Native.newQuery
1 parent c30aed4 commit c8dd0b7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

android-tree-sitter/src/main/cpp/ts_query.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ static jlong TSQuery_newQuery(JNIEnv *env,
4242
error_offset,
4343
error_type);
4444
fillQuery(env, queryObject, *error_offset, *error_type);
45+
env->ReleaseStringUTFChars(source, c_source);
4546
return (jlong) query;
4647
}
4748

0 commit comments

Comments
 (0)