Plug a minor memory leak that could occur when we opened a TCP connection
to a server. In practice this meant whenever we opened a Jabber session.
We call getaddrinfo() to get a dynamically allocated linked list of
addresses for a given server name. Then we traverse the list, looking
for one that accepts streaming connections over IPV4, in order to get
an IP address.
At the end, we call freeaddrinfo() to free the linked list.
Previously we would pass to freeaddrinfo() a pointer, not to the
head of the list, but to the node that we used for getting an IP
address. Prior nodes, if any, would leak.
Also: added calls to freeaddrinfo() in the case of early returns, to
avoid leaking the list in the event of an error.
M src/libopensrf/socket_bundle.c
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2036
9efc2488-bf62-4759-914b-
345cdb29e865