From 1cc492f23f4d0afd9108e6a9315715aaa13ab9e3 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Fri, 19 Nov 2010 23:47:19 +0000 Subject: [PATCH] [controller] Fix sharing violation due to unclosed resources --- SparkleShare/SparkleController.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SparkleShare/SparkleController.cs b/SparkleShare/SparkleController.cs index e22b7bd5..be36fc28 100644 --- a/SparkleShare/SparkleController.cs +++ b/SparkleShare/SparkleController.cs @@ -497,6 +497,7 @@ namespace SparkleShare { StreamReader reader = new StreamReader (global_config_file_path); string global_config_file = reader.ReadToEnd (); + reader.Close (); Regex regex = new Regex (@"name.+= (.+)"); Match match = regex.Match (global_config_file); @@ -530,6 +531,7 @@ namespace SparkleShare { StreamReader reader = new StreamReader (global_config_file_path); string global_config_file = reader.ReadToEnd (); + reader.Close (); Regex regex = new Regex (@"email.+= (.+)"); Match match = regex.Match (global_config_file);