Fix mismatched delete [] / new

Found with valgrind.