This project has moved. For the latest updates, please go here.
1
Vote

Security issues raised by audtor for MixedCodeDocument > StreamWriter

description

The code scan report said The function Save() in MixedCodeDocument.cs sometimes fails to release a system
resource allocated by StreamWriter() on line 310 and line 321. I guess StreamWriter did not call sw.Close() so the audthor asked for this, how can I update the code to fullfill this security requirements? Or it is a false alerm? (Checked with latest version, is following can close the connection?

public void Save(TextWriter writer)
    {
        writer.Flush();
    } 
I need a strong reason if need to get exception. Otherrise I need to updated code.

comments