Possible double free() calls in Java_sun_management_DiagnosticCommandImpl_getDiagnosticCommandInfo

XMLWordPrintable

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: P2
    • 8
    • Affects Version/s: 8, 9
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: