mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 09:34:08 +00:00
Merge pull request #924 from cheshire/fix_jni_string_leak
Free allocated char arrays in JNI API
This commit is contained in:
commit
075a56ef02
|
@ -710,6 +710,9 @@ def mk_java(java_dir, package_name):
|
|||
java_wrapper.write(' }\n')
|
||||
elif k == OUT_MANAGED_ARRAY:
|
||||
java_wrapper.write(' *(jlong**)a%s = (jlong*)_a%s;\n' % (i, i))
|
||||
|
||||
elif k == IN and param_type(param) == STRING:
|
||||
java_wrapper.write(' jenv->ReleaseStringUTFChars(a%s, _a%s);\n' % (i, i));
|
||||
i = i + 1
|
||||
# return
|
||||
if result == STRING:
|
||||
|
|
Loading…
Reference in a new issue