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

Possible double free() calls in Java_sun_management_DiagnosticCommandImpl_getDiagnosticCommandInfo

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P2 P2
    • 8
    • 8, 9
    • core-svc
    • None

      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.

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

              Created:
              Updated:
              Resolved: