Fix new[]/delete[] mismatch