[IBAL] Handle acquire_ca failing in create_iou
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 6 Apr 2006 04:23:56 +0000 (04:23 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 6 Apr 2006 04:23:56 +0000 (04:23 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@287 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/al/al_dm.c

index b823705..9d95fa6 100644 (file)
@@ -1066,6 +1066,14 @@ create_iou(
 \r
        /* It is now safe to acquire the CA and initialize the p_ci_ca pointer. */\r
        h_ca = acquire_ca( p_pnp_rec->guid );\r
+       if( !h_ca )\r
+       {\r
+               p_iou->obj.pfn_destroy( &p_iou->obj, NULL );\r
+               AL_TRACE_EXIT( AL_DBG_ERROR,\r
+                       ("acquire_ca for GUID %016I64x failed.\n", p_pnp_rec->guid) );\r
+               return IB_INVALID_CA_HANDLE;\r
+       }\r
+\r
        p_iou->obj.p_ci_ca = h_ca->obj.p_ci_ca;\r
 \r
        /* Initialize the IO unit IOC list. */\r