-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
None
The realloc() procedure is often used to increase a memory allocation that is associated with a pointer. If realloc() fails it returns the value "NULL".
When one makes the call:
myPointer = realloc(myPointer, desiredAllocationSize);
and realloc fails, then myPointer points to NULL, and any memory that it previously pointed to is lost.
line number 275 of
jdk/src/solaris/native/java/lang/java_props_macosx.c
line number 1205 of:
jdk/src/solaris/native/sun/awt/multiVis.c
line number 282 of:
jdk/src/solaris/native/sun/tools/attach/SolarisVirtualMachine.c
When one makes the call:
myPointer = realloc(myPointer, desiredAllocationSize);
and realloc fails, then myPointer points to NULL, and any memory that it previously pointed to is lost.
line number 275 of
jdk/src/solaris/native/java/lang/java_props_macosx.c
line number 1205 of:
jdk/src/solaris/native/sun/awt/multiVis.c
line number 282 of:
jdk/src/solaris/native/sun/tools/attach/SolarisVirtualMachine.c
- duplicates
-
JDK-8007606 Handle realloc() failure in unix/native/libnet/net_util_md.c correctly
- Closed
-
JDK-8007607 security native code doesn't always use malloc, realloc, and calloc correctly
- Closed
-
JDK-8007609 WinNTFileSystem_md.c should correctly check value returned from realloc
- Closed