]> jfr.im git - irc/quakenet/newserv.git/commitdiff
r446@blue (orig r431): splidge | 2006-02-24 14:34:41 +0000
authorChris Porter <redacted>
Sun, 26 Feb 2006 21:23:00 +0000 (21:23 +0000)
committerChris Porter <redacted>
Sun, 26 Feb 2006 21:23:00 +0000 (21:23 +0000)
 Fixed crash bug where user with info line is removed from chanlev.

 Changed chanservhash.c so that when it frees the info line it clears the
 dangling pointer.

chanserv/chancmds.c
chanserv/chanservhash.c

index d54eaff25b943ad5ac5a14c0c3c3170ef296521a..80a7fad489eb307789ac49038a1addbc90ba1df1 100644 (file)
@@ -572,7 +572,6 @@ int csc_dochanlev(void *source, int cargc, char **cargv) {
          csdb_deletechanuser(rcuplist);
          delreguserfromchannel(rcp, target);
        }
-        freesstring(rcuplist->info); 
        freeregchanuser(rcuplist);
        rcuplist=NULL;
         for (i=0;i<REGCHANUSERHASHSIZE;i++)
index 75346db768378e1d9b734237014d0a6025f2cb41..cca032aa53433ba63a235f62239319e07e3d877a 100644 (file)
@@ -188,6 +188,7 @@ void delreguserfromchannel(regchan *rcp, reguser *rup) {
     if ((*rcuh)->user==rup) {
       /* Found the user */
       freesstring((*rcuh)->info);
+      (*rcuh)->info=NULL;
       *rcuh=(*rcuh)->nextbychan;
       found=1;
       break;