verify if session is NULL
to not free the addrinfo twice !