Fix segfault on netsplit due to clearing metadata too late.

This commit is contained in:
B.Greenham 2010-03-05 20:06:44 -05:00
parent 67cecc2b22
commit 937efa520e
2 changed files with 4 additions and 4 deletions

View File

@ -42,7 +42,7 @@
#include "s_newconf.h"
#include "logger.h"
#include "chmode.h"
#include "irc_dictionary.h";
#include "irc_dictionary.h"
/* bitmasks for error returns, so we send once per call */
#define SM_ERR_NOTS 0x00000001 /* No TS on channel */

View File

@ -1146,6 +1146,9 @@ exit_generic_client(struct Client *client_p, struct Client *source_p, struct Cli
if(IsOper(source_p))
rb_dlinkFindDestroy(source_p, &oper_list);
/* get rid of any metadata the user may have */
user_metadata_clear(source_p);
sendto_common_channels_local(source_p, ":%s!%s@%s QUIT :%s",
source_p->name,
source_p->username, source_p->host, comment);
@ -1709,9 +1712,6 @@ free_user(struct User *user, struct Client *client_p)
{
free_away(client_p);
/* get rid of any metadata the user may have */
user_metadata_clear(client_p);
if(--user->refcnt <= 0)
{
if(user->away)