fork: free thread in copy_process on failure