6632696: Writing to closed output files (writeBytes) leaks native memory (unix)

Reviewed-by: alanb, iris
This commit is contained in:
Martin Buchholz 2008-03-10 14:32:51 -07:00
parent 4d5b998028
commit a686efe6ac

View file

@ -173,7 +173,7 @@ writeBytes(JNIEnv *env, jobject this, jbyteArray bytes,
fd = GET_FD(this, fid); fd = GET_FD(this, fid);
if (fd == -1) { if (fd == -1) {
JNU_ThrowIOException(env, "Stream Closed"); JNU_ThrowIOException(env, "Stream Closed");
return; break;
} }
n = IO_Write(fd, buf+off, len); n = IO_Write(fd, buf+off, len);
if (n == JVM_IO_ERR) { if (n == JVM_IO_ERR) {