Possible incorrect usage of WeakReference.Target in method
FirebirdSql.Data.FirebirdClient.FbConnectionInternal.TransactionUpdated
----------------------------------------------------------------------------------------------------------------------------------
Key: DNET-619
URL: http://tracker.firebirdsql.org/browse/DNET-619
Project: .NET Data provider
Issue Type: Bug
Affects Versions: 4.6.4.0, 4.1.0.0
Environment: Windows 7 prof, sp1, CPU i5-3550, mem 8 GiB
Reporter: Alex Gaysinskiy
Assignee: Jiri Cincura
Implementation of
FirebirdSql.Data.FirebirdClient.FbConnectionInternal.TransactionUpdated
function (FirebirdClient\FbConnectionInternal.cs, line 298) has incorrect
condition:
public void TransactionUpdated()
{
for (int i = 0; i < this.preparedCommands.Count; i++)
{
if (!this.preparedCommands[i].IsAlive)
continue;
FbCommand command =
this.preparedCommands[i].Target as FbCommand; //<<<= may be a null
if (command.Transaction != null) //<<<=
potential NRE. Correct code is: command != null && command.Transaction != null
{
command.CloseReader();
command.Transaction = null;
}
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider