X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Flist.c;h=d304e162d6ac5875f91750db5f6ac036a268b006;hb=refs%2Fheads%2Fupstream;hp=dcbe466efb259a656984494edc052a5fa3fc1dc6;hpb=d2bbc267ec2358a585dd28f8abf16c76a2cb7eea;p=ircu2.10.12-pk.git diff --git a/ircd/list.c b/ircd/list.c index dcbe466..d304e16 100644 --- a/ircd/list.c +++ b/ircd/list.c @@ -219,7 +219,6 @@ struct Client* make_client(struct Client *from, int status) 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 */ @@ -270,7 +269,7 @@ void free_client(struct Client* cptr) 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); @@ -437,6 +436,7 @@ struct SLink* make_link(void) } assert(0 != lp); links.inuse++; + memset(lp, 0, sizeof(*lp)); return lp; } @@ -448,8 +448,8 @@ void free_link(struct SLink* lp) if (lp) { lp->next = slinkFreeList; slinkFreeList = lp; + links.inuse--; } - links.inuse--; } /** Add an element to a doubly linked list.