- do (when (eq (sockint::addrinfo-family info) sockint::af-inet)
- (let* ((sockaddr (sockint::addrinfo-addr info))
- (address (sockint::sockaddr-in-addr sockaddr)))
- ;; The same effective result can be multiple time
- ;; in the list, with different socktypes. Only record
- ;; each address once.
- (setf (slot-value host-ent 'addresses)
- (adjoin (naturalize-unsigned-byte-8-array address
- 4)
- (host-ent-addresses host-ent)
- :test 'equalp)))))
- (sockint::freeaddrinfo (sb-alien:deref res))
+ do
+ (when (eq (sockint::addrinfo-family info) sockint::af-inet)
+ (let* ((sockaddr (sockint::addrinfo-addr info))
+ (address (sockint::sockaddr-in-addr sockaddr)))
+ ;; The same effective result can be multiple time
+ ;; in the list, with different socktypes. Only record
+ ;; each address once.
+ (setf (slot-value host-ent 'addresses)
+ (adjoin (naturalize-unsigned-byte-8-array address
+ 4)
+ (host-ent-addresses host-ent)
+ :test 'equalp))))
+ (setf info (sockint::addrinfo-next info)))
+ (sockint::freeaddrinfo to-free)