@@ -252,7 +252,7 @@ static ib_api_status_t sl2vl_update_table(osm_sm_t * sm, osm_physp_t * p,
const ib_slvl_table_t * sl2vl_table,
cl_qlist_t *mad_list)
{
- ib_slvl_table_t tbl, *p_tbl;
+ ib_slvl_table_t tbl, *p_tbl = NULL;
unsigned vl_mask;
uint8_t vl1, vl2;
int i;
@@ -283,7 +283,8 @@ static ib_api_status_t sl2vl_update_table(osm_sm_t * sm, osm_physp_t * p,
* Zero the stored SL2VL block, so in case the MAD will
* end up with error, we will resend it in the next sweep.
*/
- memset(p_tbl, 0, sizeof(tbl));
+ if (p_tbl)
+ memset(p_tbl, 0, sizeof(tbl));
cl_qlist_insert_tail(mad_list, &p_mad->list_item);
return IB_SUCCESS;