ibutils/ibis: fix ibis_get_local_ports_info uninitialized variable
PATCH 1/1 ibutils/ibis: fix ibis_get_local_ports_info uninitialized variable
Initialize attr_array before calling osm_vendor_get_all_port_attr
Signed-off-by Eitan Zahavi <eitan-VPRAkNaXOzVS1MOuV/[email protected]>
--- ibis/src/ibis.i | 1 + ibis/src/ibis_wrap.c | 1 + ibis/src/ibissh_wrap.cpp | 1 + 3 files changed, 3 insertions(+), 0 deletions(-)
ibis/src/ibis.i +1 -0
@@ -385,6 +385,7 @@ ibisp_is_debug(void) static char res[128]; Tcl_Obj *p_obj; + memset(attr_array, 0, MAX_LOCAL_IBPORTS*sizeof(ib_port_attr_t)); if (!IbisObj.initialized) { Tcl_SetStringObj(
ibis/src/ibis_wrap.c +1 -0
@@ -3209,6 +3209,7 @@ typedef struct {static char res[128 ];Tcl_Obj *p_obj; +memset (attr_array,0 ,MAX_LOCAL_IBPORTS *sizeof (ib_port_attr_t));if (!IbisObj.initialized) { Tcl_SetStringObj(
ibis/src/ibissh_wrap.cpp +1 -0
@@ -3209,6 +3209,7 @@ typedef struct { static char res[128]; Tcl_Obj *p_obj; + memset(attr_array, 0, MAX_LOCAL_IBPORTS*sizeof(ib_port_attr_t)); if (!IbisObj.initialized) { Tcl_SetStringObj(
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html