Debug((DEBUG_LIST, "Deallocating connection %p", con));
- if (con_dns_reply(con)) {
- MyFree(con_dns_reply(con));
- con_dns_reply(con) = 0;
- }
if (-1 < con_fd(con))
close(con_fd(con));
MsgQClear(&(con_sendQ(con)));
cli_connect(cptr) = con; /* set the connection and other fields */
cli_since(cptr) = cli_lasttime(cptr) = cli_firsttime(cptr) = CurrentTime;
cli_lastnick(cptr) = TStime();
- cli_unreg(cptr) = CLIREG_INIT;
} else
cli_connect(cptr) = cli_connect(from); /* use 'from's connection */
cptr, cli_connect(cptr)));
if (cli_auth(cptr))
- destroy_auth_request(cli_auth(cptr), 0);
+ destroy_auth_request(cli_auth(cptr));
/* Make sure we didn't magically get re-added to the list */
assert(cli_next(cptr) == 0);
}
assert(0 != lp);
links.inuse++;
+ memset(lp, 0, sizeof(*lp));
return lp;
}
if (lp) {
lp->next = slinkFreeList;
slinkFreeList = lp;
+ links.inuse--;
}
- links.inuse--;
}
/** Add an element to a doubly linked list.