initialize auto_ptr with NULL as return value in case of exceptions