microsoft / vstest

Visual Studio Test Platform is the runner and engine that powers test explorer and vstest.console.
MIT License
870 stars 316 forks source link

Some `XmlReader`s in XmlRunSettingsUtilities are not disposed #5093

Closed omajid closed 2 weeks ago

omajid commented 2 weeks ago

Description

In XmlRunSettingsUtilities, we allocate various XmlReaders but don't always Diposes them

Steps to reproduce

https://github.com/microsoft/vstest/blob/9ab8d6c00a359bc51887b0d29b85dbbfc4f91b28/src/Microsoft.TestPlatform.ObjectModel/Utilities/XmlRunSettingsUtilities.cs#L236

This is never Dispose()d.

Expected behavior

All IDisposables are disposed.

Actual behavior

Some IDisposables are not disposed in XmlRunSettingsUtilities.

Diagnostic logs

N/A

Environment

Commit 9ab8d6c00a359bc51887b0d29b85dbbfc4f91b28