[openib-general] [PATCH] OpenSM/osm_sa_mcmember_record.c::OpenSM/osm_sa_mcmember_record.c Return 0 when no table can be allocated

Hal Rosenstock halr at voltaire.com
Wed May 24 06:58:39 PDT 2006


OpenSM/osm_sa_mcmember_record.c Return 0 when no used MLID table can be
allocated

Signed-off-by: Hal Rosenstock <halr at voltaire.com>

Index: opensm/osm_sa_mcmember_record.c
===================================================================
--- opensm/osm_sa_mcmember_record.c	(revision 7441)
+++ opensm/osm_sa_mcmember_record.c	(working copy)
@@ -326,6 +326,8 @@ __get_new_mlid(
   /* track all used mlids in the array (by mlid index) */
   used_mlids_array =
     (uint8_t *)cl_zalloc(sizeof(uint8_t)*max_num_mlids);
+  if (!used_mlids_array)
+    return 0;
  
   /* scan all available multicast groups in the DB and fill in the table */
   while( p_mgrp != (osm_mgrp_t*)cl_qmap_end( &p_subn->mgrp_mlid_tbl ) )






More information about the general mailing list