prevent leak of stdup'd addr on error