Omair Majid

Results 41 issues of Omair Majid

https://github.com/dotnet/msbuild/blob/4a45d56330882a5e596e97d05ba568ec32e0603c/src/Build/BackEnd/BuildManager/BuildManager.cs#L3177-L3221 This doesn't quite match the double-checked locking pattern described at: https://github.com/dotnet/runtime/blob/main/docs/design/specs/Memory-model.md#examples-and-common-patterns It seems it might be possible to see a stale value of `_disposed` and then enter the lock...

Priority:2
triaged

We create a `StreamReader` via `File.OpenText`, but never `Dispose()` it. Wrap it in a `using` statement to automatically `Dispose()` it when `TryLoad(TextReader, ...)` is done using it.

https://github.com/microsoft/vstest/blob/5b69fd31169dd07ced917329bbb483f3b73ea98f/src/vstest.console/InProcessVsTestConsoleWrapper.cs#L129 The VsTestConsoleProcessManager is an IDisposable, but it's never disposed in this piece of code. Does it need to be Dispose()d or is it safe to ignore?

## Description There's two IDisposables being used in HtmlTransformer (a `Stream` and an `XmlReader`). We should Dispose() both of them. I think this is mostly a hygiene issue. Assembly.GetManifestResourceStream() allocates...

## Description It probably makes no impact, but the XmlReaders are declared as IDisposable, so we should Dispose() them when done using them. ## Related issue Kindly link any related...

https://github.com/jbevain/cecil/blob/8e1ae7b4ea67ccc38cb8db3ded6802643109ffd7/Mono.Cecil/ModuleDefinition.cs#L387-L393 It seems like this sequence of events might be possible, resulting in creation of an DefaultAssemblyResolver instance that's never disposed: 1. Thread 1 sees `assembly_resolver.value == null` 2. Thread...

- The code creates a local variable that's an IDisposable (CustomMetadataWriter), but doesn't call Dispose() on it. - The CustomMetadataWriter class holds two IDisposables (MemoryStream and BinaryStreamWriter), but was only...

We create a new instance every time, we should probably Dispose it too.

Area-Infrastructure
untriaged

## Description It's an IDisposable, so we should probably dispose it when done using it? This was flagged by a static analysis tool. Fixes #{bug number TODO}

## Description Dispose KeyWrapProvider in JwtSecurityTokenHandler KeyWrapProvider is an IDisposable, so we should dispose it when done using it? This was flagged by a static analysis tool. Fixes #{bug number...