Fix missed use of auto_ptr.