Skip to content

SDSUtils.BuildDirectoryEntry(_ctxBase.Path, _credentials, _authTypes) is not disposed at the end of the function #94779

Open
@achufistov

Description

@achufistov

Description

dotnet 6.0

File: /src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMStoreCtx.cs:592

Problem: SDSUtils.BuildDirectoryEntry(_ctxBase.Path, _credentials, _authTypes) is not disposed at the end of the function

Reproduction Steps

  1. Role: detected
    detected
    [SAMStoreCtx.cs:[592:0]]

  2. Role: tracepoint
    2.1 created in method System.DirectoryServices.AccountManagement.SDSUtils.BuildDirectoryEntry(string, System.DirectoryServices.AccountManagement.NetCred, System.DirectoryServices.AuthenticationTypes)
    [SAMStoreCtx.cs:[592:40]]
    2.2 no escape
    [SAMStoreCtx.cs:[592:40]]
    2.3 return
    [SAMStoreCtx.cs:[607:20]]

Expected behavior

memory leak

Actual behavior

memory leak

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions