[ofa-general] Re: [PATCH] opensm: skeleton for toroidal mesh analysis
Sasha Khapyorsky
sashak at voltaire.com
Sun Nov 30 11:07:52 PST 2008
On 12:58 Sun 30 Nov , Robert Pearson wrote:
> You wrote:
> > @@ -872,10 +821,15 @@ static int lash_core(lash_t * p_lash)
> > int output_link2, i_next_switch2;
> > int cycle_found2 = 0;
> > int status = 0;
> > - int *switch_bitmap; /* Bitmap to check if we have processed this
> > pair */
> > + int *switch_bitmap = NULL; /* Bitmap to check if we have
> > processed this pair */
>
> Why this initialization is needed?
>
> The added code can fail which will cause a goto to Exit. At Exit
> switch_bitmap is freed if it is not zero. The added initialization makes
> sure it is zero.
Ok. I missed that.
Sasha
More information about the general
mailing list