From fa25f3e4e92d962f037267a65222794232d51a1b Mon Sep 17 00:00:00 2001 From: "nicolson%netscape.com" Date: Wed, 30 Jan 2002 19:52:02 +0000 Subject: [PATCH] Fix 122437: Memory leak in read method of SSLSocket --- security/jss/org/mozilla/jss/ssl/SSLSocket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/jss/org/mozilla/jss/ssl/SSLSocket.c b/security/jss/org/mozilla/jss/ssl/SSLSocket.c index a259a115039..ec0d95796a6 100644 --- a/security/jss/org/mozilla/jss/ssl/SSLSocket.c +++ b/security/jss/org/mozilla/jss/ssl/SSLSocket.c @@ -646,7 +646,7 @@ Java_org_mozilla_jss_ssl_SSLSocket_socketRead(JNIEnv *env, jobject self, finish: EXCEPTION_CHECK(env, sock) (*env)->ReleaseByteArrayElements(env, bufBA, buf, - (nread>0) ? JNI_COMMIT : JNI_ABORT); + (nread>0) ? 0 /*copy and free*/ : JNI_ABORT /*free, no copy*/); return nread; }