prevent leak of strdup'd addr on error