[SimpleSort] Make sure memory stream is disposed

This commit is contained in:
Matt Nadareski
2016-09-17 18:25:05 -07:00
parent 92330940f7
commit 49027e4a50

View File

@@ -456,7 +456,8 @@ namespace SabreTools.Helper
// If there's a match, get the new information from the stream
if (rule.Tests != null && rule.Tests.Count != 0)
{
MemoryStream output = new MemoryStream();
using (MemoryStream output = new MemoryStream())
{
FileStream input = File.OpenRead(file);
Skippers.TransformStream(input, output, rule, _logger, false, true);
Rom romNH = FileTools.GetSingleStreamInfo(output);
@@ -476,6 +477,7 @@ namespace SabreTools.Helper
matchdat.Files.Add(key, temp);
}
}
}
return true;
}