[ofa-general] [PATCH] ibutils: fixing seg. fault in ibis_gsi_mad_ctrl.c

Yevgeny Kliteynik kliteyn at dev.mellanox.co.il
Thu May 22 05:20:53 PDT 2008


Hi Oren,

Fixing seg fault in allocation of gsi management class vector.

Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
---
 ibis/src/ibis_gsi_mad_ctrl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ibis/src/ibis_gsi_mad_ctrl.c b/ibis/src/ibis_gsi_mad_ctrl.c
index 356d33d..bfb5fe6 100644
--- a/ibis/src/ibis_gsi_mad_ctrl.c
+++ b/ibis/src/ibis_gsi_mad_ctrl.c
@@ -731,7 +731,7 @@ ibis_gsi_mad_ctrl_set_class_attr_cb(
   size = cl_vector_get_size(&p_ctrl->class_vector);
   if (size <= mad_class)
   {
-    cl_status = cl_vector_set_size(&p_ctrl->class_vector,mad_class);
+    cl_status = cl_vector_set_size(&p_ctrl->class_vector,mad_class+1);

     if( cl_status != CL_SUCCESS)
     {
-- 
1.5.1.4




More information about the general mailing list