Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing call to DeleteLocalRef in Android code #12

Closed
GrahamAsher opened this issue May 27, 2023 · 0 comments
Closed

missing call to DeleteLocalRef in Android code #12

GrahamAsher opened this issue May 27, 2023 · 0 comments

Comments

@GrahamAsher
Copy link

This statement (as far as I understand the JNI) creates a local reference:

naett/naett.c

Line 1486 in cad8664

jobject values = call(env, headerMap, "get", "(Ljava/lang/Object;)Ljava/lang/Object;", name);

but it is not deleted, like the other local references, here:

naett/naett.c

Lines 1499 to 1500 in cad8664

(*env)->DeleteLocalRef(env, name);
(*env)->DeleteLocalRef(env, value);

The fix is to add the following statement at line 1501:

(*env)->DeleteLocalRef(env, values);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants