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

Possible double free() calls in Java_sun_management_DiagnosticCommandImpl_getDiagnosticCommandInfo

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Duplicate
    • Affects Version/s: 8, 9
    • Fix Version/s: 8
    • Component/s: core-svc
    • Labels:
      None

      Description

      The code does:

        if (result == NULL) {
            free(dcmd_info_array);
            JNU_ThrowOutOfMemoryError(env, 0);
        }
        ...
        free(dcmd_info_array);

      JNU_ThrowOutOfMemoryError() does not cause the current function to return (it is not a macro), so free(dcmd_info_array) can be called twice.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mgronlun Markus Grönlund
                Reporter:
                sla Staffan Larsen (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: