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

Eitan Zahavi eitan at mellanox.co.il
Wed May 24 08:34:13 PDT 2006


Looks right

EZ

> -----Original Message-----
> From: Hal Rosenstock [mailto:halr at voltaire.com]
> Sent: Wednesday, May 24, 2006 4:59 PM
> To: openib-general at openib.org
> Cc: Eitan Zahavi
> Subject:
> [PATCH]OpenSM/osm_sa_mcmember_record.c::OpenSM/osm_sa_mcmember_record
> .c Return 0when no table can be allocated
> 
> 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