]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
Fix segfault on netsplit due to clearing metadata too late.
authorB.Greenham <redacted>
Sat, 6 Mar 2010 01:06:44 +0000 (20:06 -0500)
committerB.Greenham <redacted>
Sat, 6 Mar 2010 01:06:44 +0000 (20:06 -0500)
src/chmode.c
src/client.c

index e0aaf665895816ed73ea414f7c2842121c7aa32b..ecff7d9d770736b9100455b2bedcbc4c0855c09d 100644 (file)
@@ -42,7 +42,7 @@
 #include "s_newconf.h"
 #include "logger.h"
 #include "chmode.h"
 #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 */
 
 /* bitmasks for error returns, so we send once per call */
 #define SM_ERR_NOTS             0x00000001     /* No TS on channel */
index 24544f19336fa3bc34c8bad6e1e50b514edeb79f..b76caf4ce9a852181613b5859fe311eb136403be 100644 (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);
 
        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);
        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);
 
 {
        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)
        if(--user->refcnt <= 0)
        {
                if(user->away)