diff --git a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs index 38d0a8fc3d..19ae115b68 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs @@ -91,6 +91,8 @@ namespace OpenSim.Framework.Data.MySQL asset.Name = (string)dbReader["name"]; asset.Type = (sbyte)dbReader["assetType"]; } + dbReader.Close(); + cmd.Dispose(); } } catch (Exception) @@ -122,6 +124,7 @@ namespace OpenSim.Framework.Data.MySQL cmd.Parameters.AddWithValue("?temporary", asset.Temporary); cmd.Parameters.AddWithValue("?data", asset.Data); cmd.ExecuteNonQuery(); + cmd.Dispose(); } }