Investigate whether allocated PCCERT_CONTEXT is freed

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: libmongoc, tls
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      While looking into CDRIVER-3227 I realized that the PCCERT_CONTEXT pointer, which is initialized by CertSetCertificateContextProperty in mongoc_secure_channel_setup_certificate_from_file, is never freed.

      Based on this program example in Microsoft's documentation, it looks like we should free the pointer with CertFreeCertificateContext.

      I do see that the allocated PCCERT_CONTEXT is later passed to AcquireCredentialsHandle via the SCHANNEL_CRED struct, so perhaps it is ultimately freed later on. If so, there may be nothing to fix here.

            Assignee:
            Kevin Albertson
            Reporter:
            Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: