[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/42823] tcp/ip sockets read/write operations causes memory
From: |
gert.brettlecker at ergon dot ch |
Subject: |
[Bug classpath/42823] tcp/ip sockets read/write operations causes memory leak |
Date: |
Wed, 30 Mar 2011 11:09:16 +0000 |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42823
Gert Brettlecker <gert.brettlecker at ergon dot ch> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gert.brettlecker at ergon
| |dot ch
--- Comment #2 from Gert Brettlecker <gert.brettlecker at ergon dot ch>
2011-03-30 11:09:07 UTC ---
Hi
I had similiar problems and found two leaks in VMInetAddress.c which can be
fixed with:
--- classpath-0.98/native/jni/java-net/java_net_VMInetAddress.c
+++ classpath-0.98/native/jni/java-net/java_net_VMInetAddress.c
@@ -180,6 +180,7 @@
/* Resolve the address and return the name */
result = cpnet_getHostByAddr (env, addr, hostname, sizeof (hostname));
+ cpnet_freeAddress (env, addr);
if (result != CPNATIVE_OK)
{
JCL_ThrowException (env, UNKNOWN_HOST_EXCEPTION,
@@ -330,6 +331,7 @@
}
result = cpnet_aton (env, hostname, &address);
+ (*env)->ReleaseStringUTFChars (env, host, hostname);
if (result != CPNATIVE_OK)
{
JCL_ThrowException (env, UNKNOWN_HOST_EXCEPTION, "Internal Error");
I also add this as proposed patch.
Cheers
Gert
- [Bug classpath/42823] tcp/ip sockets read/write operations causes memory leak,
gert.brettlecker at ergon dot ch <=