From 8aeb8fa0d064fe162e14c393e9c04c411817d02f Mon Sep 17 00:00:00 2001 From: Tzachi Dar Date: Wed, 1 Sep 2010 08:59:40 +0000 Subject: [PATCH] [IBAL] Add an assert to check cases where cl_obj_dref is causing a destroy of the object without destroy being called first. (mlnx 6401) git-svn-id: svn://openib.tc.cornell.edu/gen1@2881 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- trunk/core/complib/cl_obj.c | 1 + 1 file changed, 1 insertion(+) diff --git a/trunk/core/complib/cl_obj.c b/trunk/core/complib/cl_obj.c index 259a5f53..5f256354 100644 --- a/trunk/core/complib/cl_obj.c +++ b/trunk/core/complib/cl_obj.c @@ -485,6 +485,7 @@ cl_obj_deref( /* If the reference count went to 0, the object should be destroyed. */ if( ref_cnt == 0 ) { + CL_ASSERT( p_obj->state == CL_DESTROYING ); if( p_obj->destroy_type == CL_DESTROY_ASYNC ) { /* Queue the object for asynchronous destruction. */ -- 2.46.0