Hi Sanjay,

>>>>>> Is moving items up in the lists creating a memory leak?
> I think what Joe is specifically referring to is the "i"th instance, 
> i.e. when dp->controllers[i]->name matches cp->name. In this case, we 
> overwrite dp->controllers[i] with i+1 (referred to as "j" with "j+1").  
> At this point any reference to matched instance  from dp->controllers[i] 
> is lost.
> 
> So the assertion made is that it points cp, which is freed below.
> 
> Is that correct ?
> 
Yes, that's correct. When we find a match we move the pointers in the 
list that is associated with the disk(dp) and then free cp below.

sarah
****


Reply via email to