Clean up old allocations in pipe.c before allocating