Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-90642

Fix memory leak in MongoBase::Functions::_setOIDCIdPAuthCallback::call()

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.0-rc14
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • Fully Compatible
    • ALL
    • v8.0

      When the OIDCIdPauthCallback function in mongo.cpp (see https://github.com/10gen/mongo/blob/master/src/mongo/scripting/mozjs/mongo.cpp#L890C19-L890C26, we allocate a new Scope without using an RAII container (i.e unique_ptr). This is introduces a memory leak.

      Consider assigning the newly allocated pointer into a unique_ptr to ensure it gets deleted at the end of the scope.

            Assignee:
            cedric.sirianni@mongodb.com Cedric Sirianni (Inactive)
            Reporter:
            santiago.roche@mongodb.com Santiago Roche
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: