0 | |
commit bd7e50228316124502505599009048d79b9bfdb6
|
1 | |
Author: Daniel Klein <danielk@mellanox.com>
|
2 | |
Date: Wed Mar 19 18:59:09 2014 +0200
|
3 | |
|
4 | |
ibutils\ibis: fix ibis_get_local_ports_info uninitialized variable
|
5 | |
|
6 | |
Initialize attr_array before calling osm_vendor_get_all_port_attr
|
7 | |
|
8 | |
Signed-off-by: Eitan Zahavi <eitan@mellanox.co.il>
|
9 | |
Signed-off-by: Daniel Klein <danielk@mellanox.com>
|
10 | |
|
11 | |
diff --git a/ibis/src/ibis.i b/ibis/src/ibis.i
|
12 | |
index 8fc4440..28a0912 100644
|
13 | |
--- a/ibis/src/ibis.i
|
14 | |
+++ b/ibis/src/ibis.i
|
15 | |
@@ -385,6 +385,7 @@ ibisp_is_debug(void)
|
16 | |
static char res[128];
|
17 | |
Tcl_Obj *p_obj;
|
18 | |
|
19 | |
+ memset(attr_array, 0, MAX_LOCAL_IBPORTS*sizeof(ib_port_attr_t));
|
20 | |
if (!IbisObj.initialized)
|
21 | |
{
|
22 | |
Tcl_SetStringObj(
|
23 | |
diff --git a/ibis/src/ibis_wrap.c b/ibis/src/ibis_wrap.c
|
24 | |
index 5098c2a..ee97601 100644
|
25 | |
--- a/ibis/src/ibis_wrap.c
|
26 | |
+++ b/ibis/src/ibis_wrap.c
|
27 | |
@@ -3209,6 +3209,7 @@ typedef struct {
|
28 | |
static char res[128];
|
29 | |
Tcl_Obj *p_obj;
|
30 | |
|
31 | |
+ memset(attr_array, 0, MAX_LOCAL_IBPORTS*sizeof(ib_port_attr_t));
|
32 | |
if (!IbisObj.initialized)
|
33 | |
{
|
34 | |
Tcl_SetStringObj(
|
35 | |
diff --git a/ibis/src/ibissh_wrap.cpp b/ibis/src/ibissh_wrap.cpp
|
36 | |
index f75cde6..917904f 100644
|
37 | |
--- a/ibis/src/ibissh_wrap.cpp
|
38 | |
+++ b/ibis/src/ibissh_wrap.cpp
|
39 | |
@@ -3209,6 +3209,7 @@ typedef struct {
|
40 | |
static char res[128];
|
41 | |
Tcl_Obj *p_obj;
|
42 | |
|
43 | |
+ memset(attr_array, 0, MAX_LOCAL_IBPORTS*sizeof(ib_port_attr_t));
|
44 | |
if (!IbisObj.initialized)
|
45 | |
{
|
46 | |
Tcl_SetStringObj(
|