opensm/osm_sa_mcmember_record.c: Minor logic change in __get_new_mlid

Signed-off-by: Hal Rosenstock <[EMAIL PROTECTED]>

diff --git a/opensm/opensm/osm_sa_mcmember_record.c 
b/opensm/opensm/osm_sa_mcmember_record.c
index c982f40..3cfd5f7 100644
--- a/opensm/opensm/osm_sa_mcmember_record.c
+++ b/opensm/opensm/osm_sa_mcmember_record.c
@@ -181,10 +181,9 @@ __get_new_mlid(IN osm_sa_t * sa, IN ib_net16_t 
requested_mlid)
 
        /* track all used mlids in the array (by mlid index) */
        used_mlids_array = (uint8_t *) malloc(sizeof(uint8_t) * max_num_mlids);
-       if (used_mlids_array)
-               memset(used_mlids_array, 0, sizeof(uint8_t) * max_num_mlids);
        if (!used_mlids_array)
                return 0;
+       memset(used_mlids_array, 0, sizeof(uint8_t) * max_num_mlids);
 
        /* 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)) {


_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to