From d12d33d71608ac5ce0ff43952f5239bfaad3fb3d Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Fri, 14 Jan 2011 08:13:49 -0700 Subject: [PATCH] fix memory leak in Java_java_io_File_length --- classpath/java-io.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classpath/java-io.cpp b/classpath/java-io.cpp index 06dd0cc375..f3463e25b8 100644 --- a/classpath/java-io.cpp +++ b/classpath/java-io.cpp @@ -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;