int threadfd = timed_thread_readfd(mail->p_timed_thread);
char resolved_host = 0;
struct addrinfo hints;
- struct addrinfo *ai, *rp;
+ struct addrinfo *ai = 0, *rp;
char portbuf[8];
while (fail < mail->retries) {
close(sockfd);
}
freeaddrinfo(ai);
+ ai = 0;
if (rp == NULL) {
perror("connect");
fail++;
struct mail_s *mail = (struct mail_s *)arg;
char resolved_host = 0;
struct addrinfo hints;
- struct addrinfo *ai, *rp;
+ struct addrinfo *ai = 0, *rp;
char portbuf[8];
while (fail < mail->retries) {
fail++;
break;
}
- resolved_host = 1;
-}
+ resolved_host = 1;
+ }
if (fail > 0) {
NORM_ERR("Trying POP3 connection again for %s@%s (try %u/%u)",
mail->user, mail->host, fail + 1, mail->retries);
close(sockfd);
}
freeaddrinfo(ai);
+ ai = 0;
if (rp == NULL) {
perror("connect");
fail++;