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_lastModified (exposed in debug mode)
This commit is contained in:
parent
526e3a41a8
commit
b3d4f33522
@ -584,8 +584,10 @@ Java_java_io_File_lastModified(JNIEnv* e, jclass, jstring path)
|
|||||||
return fileDate.QuadPart / 10000000L;
|
return fileDate.QuadPart / 10000000L;
|
||||||
#else
|
#else
|
||||||
struct stat fileStat;
|
struct stat fileStat;
|
||||||
if (stat(chars, &fileStat) == -1) {
|
int res = stat(chars, &fileStat);
|
||||||
releaseChars(e, path, chars);
|
releaseChars(e, path, chars);
|
||||||
|
|
||||||
|
if (res == -1) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user