mirror of
https://github.com/corda/corda.git
synced 2025-01-05 20:54:13 +00:00
fix memory leak in Java_java_io_File_length
This commit is contained in:
parent
ff18524906
commit
d12d33d716
@ -325,10 +325,10 @@ Java_java_io_File_length(JNIEnv* e, jclass, jstring path)
|
||||
if (chars) {
|
||||
STRUCT_STAT s;
|
||||
int r = STAT(chars, &s);
|
||||
releaseChars(e, path, chars);
|
||||
if (r == 0) {
|
||||
return s.st_size;
|
||||
}
|
||||
releaseChars(e, path, chars);
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user