Fix unique_ptr that holds an allocated array