Author: cgutman
Date: Wed Jul 3 08:52:17 2013
New Revision: 59412
URL:
http://svn.reactos.org/svn/reactos?rev=59412&view=rev
Log:
[TCPIP]
- Add asserts to ReferenceObject and DereferenceObject to catch reference misuse
Modified:
trunk/reactos/drivers/network/tcpip/include/titypes.h
Modified: trunk/reactos/drivers/network/tcpip/include/titypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/incl…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/include/titypes.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/include/titypes.h [iso-8859-1] Wed Jul 3 08:52:17
2013
@@ -13,6 +13,7 @@
*/
#define ReferenceObject(Object) \
{ \
+ ASSERT((Object)->RefCount); \
InterlockedIncrement(&((Object)->RefCount)); \
}
@@ -22,6 +23,7 @@
*/
#define DereferenceObject(Object) \
{ \
+ ASSERT((Object)->RefCount); \
if (InterlockedDecrement(&((Object)->RefCount)) == 0) \
(((Object)->Free)(Object)); \
}