CID 316609: Resource leak in bin/tests/test_client.c
Recently committed as e493e04c by @ondrej:
*** CID 316609: (RESOURCE_LEAK)
/bin/tests/test_client.c: 258 in parse_options()
252 for (struct addrinfo *rp = result; rp != NULL; rp = rp->ai_next)
253 {
254 RUNTIME_CHECK(isc_sockaddr_fromsockaddr(
255 &sockaddr_remote, rp->ai_addr) ==
256 ISC_R_SUCCESS);
257 }
>>> CID 316609: (RESOURCE_LEAK)
>>> Variable "result" going out of scope leaks the storage it points to.
258 }
259
260 isc_sockaddr_format(&sockaddr_local, buf, sizeof(buf));
261
262 printf("Will connect from %s://%s", protocols[protocol], buf);
263
/bin/tests/test_client.c: 240 in parse_options()
234 for (struct addrinfo *rp = result; rp != NULL; rp = rp->ai_next)
235 {
236 RUNTIME_CHECK(isc_sockaddr_fromsockaddr(&sockaddr_local,
237 rp->ai_addr) ==
238 ISC_R_SUCCESS);
239 }
>>> CID 316609: (RESOURCE_LEAK)
>>> Variable "result" going out of scope leaks the storage it points to.
240 }
241
242 {
243 struct addrinfo hints = {
244 .ai_family = family,
245 .ai_socktype = (protocol == UDP) ? SOCK_DGRAM