From be9638d020a7ca5da7e384f4e9647612e2223129 Mon Sep 17 00:00:00 2001 From: ftillier Date: Thu, 6 Apr 2006 04:23:56 +0000 Subject: [PATCH] [IBAL] Handle acquire_ca failing in create_iou git-svn-id: svn://openib.tc.cornell.edu/gen1@287 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- trunk/core/al/al_dm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/trunk/core/al/al_dm.c b/trunk/core/al/al_dm.c index b823705d..9d95fa61 100644 --- a/trunk/core/al/al_dm.c +++ b/trunk/core/al/al_dm.c @@ -1066,6 +1066,14 @@ create_iou( /* It is now safe to acquire the CA and initialize the p_ci_ca pointer. */ h_ca = acquire_ca( p_pnp_rec->guid ); + if( !h_ca ) + { + p_iou->obj.pfn_destroy( &p_iou->obj, NULL ); + AL_TRACE_EXIT( AL_DBG_ERROR, + ("acquire_ca for GUID %016I64x failed.\n", p_pnp_rec->guid) ); + return IB_INVALID_CA_HANDLE; + } + p_iou->obj.p_ci_ca = h_ca->obj.p_ci_ca; /* Initialize the IO unit IOC list. */ -- 2.41.0