Can't see the bug here. E.g. [a]->[b]->[c] where pcb points to [b] (the pcb
to be removed) at the first iteration pcb2->next will also point to [b] thus
equals pcb. pcb2->next (a.next) must be assigned pcb->next (b.next).
pcb2->next->next equals pcb->next so this is pointless.