Clean up channel allocation table on shutdown/restart.
Silly bug: the condition of a while() loop in the Channel_Exit() function
used the wrong variable and therefore got never executed ...
This bug is in the code since the beginning (see commit bb19cfda
in 2002);
shame on me!
This commit is contained in:
parent
40a0e9abbe
commit
175f0af979
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* ngIRCd -- The Next Generation IRC Daemon
|
* ngIRCd -- The Next Generation IRC Daemon
|
||||||
* Copyright (c)2001-2008 by Alexander Barton (alex@barton.de)
|
* Copyright (c)2001-2009 Alexander Barton (alex@barton.de)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -174,10 +174,9 @@ Channel_Exit( void )
|
||||||
|
|
||||||
/* Free Channel allocation table */
|
/* Free Channel allocation table */
|
||||||
cl2chan = My_Cl2Chan;
|
cl2chan = My_Cl2Chan;
|
||||||
while( c )
|
while (cl2chan) {
|
||||||
{
|
|
||||||
cl2chan_next = cl2chan->next;
|
cl2chan_next = cl2chan->next;
|
||||||
free( cl2chan );
|
free(cl2chan);
|
||||||
cl2chan = cl2chan_next;
|
cl2chan = cl2chan_next;
|
||||||
}
|
}
|
||||||
} /* Channel_Exit */
|
} /* Channel_Exit */
|
||||||
|
|
Loading…
Reference in New Issue