A local variable ai was uninitialized in the case of getaddrinfo
failing. It is not set to 0 (NULL) as it should. This bug was
introduced in YAZ 3.0.51 when a leak for getaddrinfo resources
was fixed.
{
tcpip_state *sp = (tcpip_state *)h->cprivate;
const char *port = "210";
{
tcpip_state *sp = (tcpip_state *)h->cprivate;
const char *port = "210";
+ struct addrinfo *ai = 0;
if (h->protocol == PROTO_HTTP)
port = "80";
if (!tcpip_init())
if (h->protocol == PROTO_HTTP)
port = "80";
if (!tcpip_init())