-
Bug
-
Resolution: Fixed
-
P4
-
None
-
b17
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8298236 | 11.0.19-oracle | Prasadarao Koppula | P4 | Resolved | Fixed | b01 |
JDK-8299449 | 11.0.19 | Goetz Lindenmaier | P4 | Resolved | Fixed | b01 |
JDK-8298439 | 8u371 | Prasadarao Koppula | P4 | Resolved | Fixed | b01 |
In src/java.security.jgss/share/native/libj2gss/NativeUtil.c:
723 jbytes = (*env)->NewByteArray(env, cLen+2);
724 if (jbytes == NULL) {
725 return NULL;
726 }
727 (*env)->SetByteArrayRegion(env, jbytes, 0, 2, (jbyte *) oidHdr);
728 if ((*env)->ExceptionCheck(env)) {
729 return NULL;
730 }
731 (*env)->SetByteArrayRegion(env, jbytes, 2, cLen, (jbyte *) cOid->elements);
732 if ((*env)->ExceptionCheck(env)) {
733 return NULL;
734 }
735 result = (*env)->NewObject(env, CLS_Oid, MID_Oid_ctor1, jbytes);
736 if ((*env)->ExceptionCheck(env)) {
737 return NULL;
738 }
739 (*env)->DeleteLocalRef(env, jbytes);
740 return result;
Here when "return NULL" is called jbytes is not released.
723 jbytes = (*env)->NewByteArray(env, cLen+2);
724 if (jbytes == NULL) {
725 return NULL;
726 }
727 (*env)->SetByteArrayRegion(env, jbytes, 0, 2, (jbyte *) oidHdr);
728 if ((*env)->ExceptionCheck(env)) {
729 return NULL;
730 }
731 (*env)->SetByteArrayRegion(env, jbytes, 2, cLen, (jbyte *) cOid->elements);
732 if ((*env)->ExceptionCheck(env)) {
733 return NULL;
734 }
735 result = (*env)->NewObject(env, CLS_Oid, MID_Oid_ctor1, jbytes);
736 if ((*env)->ExceptionCheck(env)) {
737 return NULL;
738 }
739 (*env)->DeleteLocalRef(env, jbytes);
740 return result;
Here when "return NULL" is called jbytes is not released.
- backported by
-
JDK-8298236 JGSS: Fix leak in exception cases in getJavaOID()
- Resolved
-
JDK-8298439 JGSS: Fix leak in exception cases in getJavaOID()
- Resolved
-
JDK-8299449 JGSS: Fix leak in exception cases in getJavaOID()
- Resolved
- duplicates
-
JDK-8221202 Memory leak in exception cases in getJavaOID()
- Closed
(1 links to)