Fix malloc/delete mismatch.