src/mod-sockcheck.c (sockcheck_begin_test): Make io_fd assignment
clearer.
(sockcheck_read_conf): Free the addrinfo we get.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-58
# arch-tag: automatic-ChangeLog--srvx@srvx.net--2006/srvx--devo--1.3
#
# arch-tag: automatic-ChangeLog--srvx@srvx.net--2006/srvx--devo--1.3
#
+2006-10-07 00:03:52 GMT Michael Poole <mdpoole@troilus.org> patch-58
+
+ Summary:
+ Fix a (tiny) memory leak in mod-sockcheck.c.
+ Revision:
+ srvx--devo--1.3--patch-58
+
+ src/mod-sockcheck.c (sockcheck_begin_test): Make io_fd assignment
+ clearer.
+ (sockcheck_read_conf): Free the addrinfo we get.
+
+ modified files:
+ ChangeLog src/mod-sockcheck.c
+
+
2006-10-06 23:18:58 GMT Michael Poole <mdpoole@troilus.org> patch-57
Summary:
2006-10-06 23:18:58 GMT Michael Poole <mdpoole@troilus.org> patch-57
Summary:
client->state = client->tests->list[client->test_index];
client->read_pos = 0;
client->read_used = 0;
client->state = client->tests->list[client->test_index];
client->read_pos = 0;
client->read_used = 0;
- client->fd = io_fd = ioset_connect(sockcheck_conf.local_addr, sockcheck_conf.local_addr_len, client->addr->hostname, client->state->port, 0, client, sockcheck_connected);
+ io_fd = ioset_connect(sockcheck_conf.local_addr, sockcheck_conf.local_addr_len, client->addr->hostname, client->state->port, 0, client, sockcheck_connected);
+ client->fd = io_fd;
if (!io_fd) {
client->test_index++;
continue;
if (!io_fd) {
client->test_index++;
continue;
sockcheck_conf.local_addr_len = ai->ai_addrlen;
sockcheck_conf.local_addr = calloc(1, ai->ai_addrlen);
memcpy(sockcheck_conf.local_addr, ai->ai_addr, ai->ai_addrlen);
sockcheck_conf.local_addr_len = ai->ai_addrlen;
sockcheck_conf.local_addr = calloc(1, ai->ai_addrlen);
memcpy(sockcheck_conf.local_addr, ai->ai_addr, ai->ai_addrlen);
} else {
sockcheck_conf.local_addr_len = 0;
sockcheck_conf.local_addr = NULL;
} else {
sockcheck_conf.local_addr_len = 0;
sockcheck_conf.local_addr = NULL;