sorry, i think i found my problem, and it's not related with what you posted, because by doing that i would be making a copy of what the pointers point to.
My problem was like, (*pp) points to the same place that next points to, and changing next i was also changing (*pp), because next was actually (*pp) lol.