Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8001585

realloc is used naively in the native code

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • None
    • other-libs

      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

            jzavgren John Zavgren (Inactive)
            jzavgren John Zavgren (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: