Use initialization and destroy functions to make code readble and correct. Also when getaddrinfo returns any error report it as such so entries do not expire