summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--unix/modjni.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/unix/modjni.c b/unix/modjni.c
index b4af9ca93c..44a0b47e7a 100644
--- a/unix/modjni.c
+++ b/unix/modjni.c
@@ -378,12 +378,16 @@ STATIC mp_obj_t call_method(jobject obj, const char *name, jarray methods, bool
}
JJ(ReleaseStringUTFChars, name_o, decl);
+ JJ(DeleteLocalRef, name_o);
+ JJ(DeleteLocalRef, meth);
return ret;
}
}
next_method:
JJ(ReleaseStringUTFChars, name_o, decl);
+ JJ(DeleteLocalRef, name_o);
+ JJ(DeleteLocalRef, meth);
}
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_TypeError, "method not found"));