Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-3228

Investigate whether allocated PCCERT_CONTEXT is freed

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: libmongoc, tls
    • 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:
            Unassigned Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: