copy caused double free