Use a temp pointer when realloc()ing