mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +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) {
|
if (chars) {
|
||||||
STRUCT_STAT s;
|
STRUCT_STAT s;
|
||||||
int r = STAT(chars, &s);
|
int r = STAT(chars, &s);
|
||||||
|
releaseChars(e, path, chars);
|
||||||
if (r == 0) {
|
if (r == 0) {
|
||||||
return s.st_size;
|
return s.st_size;
|
||||||
}
|
}
|
||||||
releaseChars(e, path, chars);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user