From ae191cd3042fec6b753b41b19907d236690a70cf Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 6 May 2017 15:57:47 +0100 Subject: dispose some MemoryStreams --- OpenSim/Capabilities/Handlers/GetTexture/GetTextureRobustHandler.cs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'OpenSim/Capabilities/Handlers/GetTexture/GetTextureRobustHandler.cs') diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureRobustHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureRobustHandler.cs index d5df7a2..c339ec5 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureRobustHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureRobustHandler.cs @@ -368,9 +368,6 @@ namespace OpenSim.Capabilities.Handlers try { // Taking our jpeg2000 data, decoding it, then saving it to a byte array with regular data - - imgstream = new MemoryStream(); - // Decode image to System.Drawing.Image if (OpenJPEG.DecodeToImage(texture.Data, out managedImage, out image) && image != null) { @@ -412,10 +409,7 @@ namespace OpenSim.Capabilities.Handlers managedImage.Clear(); if (imgstream != null) - { - imgstream.Close(); imgstream.Dispose(); - } } return data; -- cgit v1.1