Avoid leak in KeystoreImpl.m when using CFArrayCreateMutable

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: 25, 27
    • Component/s: security-libs
    • None

      In KeystoreImpl.m we use CFArrayCreateMutable, but we do not always CFRelease the resources we created.
      This should be adjusted.


      When looking at the same file, seems privateKeyRef from
      SecKeyRef privateKeyRef;
      err = SecIdentityCopyPrivateKey(theIdentity, &privateKeyRef);
      https://github.com/openjdk/jdk/blob/5ba91fed345b078a67ad6bead1d8893bd9289f58/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m#L343

      needs to be CFReleased too according to
      https://developer.apple.com/documentation/security/secidentitycopyprivatekey(_:_:)

            Assignee:
            Matthias Baesken
            Reporter:
            Matthias Baesken
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: