leak's the file descriptor, this sort of error is usually terminal anyway. but better to clean up and return error.