Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2005-04-16 13:17:29 UTC
Modified files:
ChangeLog ircd/class.c ircd/ircd_parser.y ircd/s_conf.c
Log message:
Fix /rehash memory leaks and realname Kill blocks.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.595 ircu2.10/ChangeLog:1.596
--- ircu2.10/ChangeLog:1.595 Fri Apr 15 18:53:00 2005
+++ ircu2.10/ChangeLog Sat Apr 16 06:17:01 2005
@@ -1,3 +1,15 @@
+2005-04-16 Michael Poole <[EMAIL PROTECTED]>
+
+ * ircd/class.c (free_class): Free default_umode field.
+
+ * ircd/ircd_parser.y (classblock): Free default_umode field before
+ overwriting it.
+
+ * ircd/s_conf.c (free_conf): Free username, origin_name, hub_limit
+ fields.
+ (find_kill): Realname Kill blocks no longer have $R at the start,
+ so do not skip over the first two characters of the mask.
+
2005-04-15 Michael Poole <[EMAIL PROTECTED]>
* doc/example.conf (Operator): Properly qualify plaintext password.
Index: ircu2.10/ircd/class.c
diff -u ircu2.10/ircd/class.c:1.29 ircu2.10/ircd/class.c:1.30
--- ircu2.10/ircd/class.c:1.29 Fri Dec 10 21:13:43 2004
+++ ircu2.10/ircd/class.c Sat Apr 16 06:17:19 2005
@@ -18,7 +18,7 @@
*/
/** @file
* @brief Implementation of connection class handling functions.
- * @version $Id: class.c,v 1.29 2004/12/11 05:13:43 klmitch Exp $
+ * @version $Id: class.c,v 1.30 2005/04/16 13:17:19 entrope Exp $
*/
#include "config.h"
@@ -77,8 +77,8 @@
if (p)
{
assert(0 == p->valid);
- if (p->cc_name)
- MyFree(p->cc_name);
+ MyFree(p->cc_name);
+ MyFree(p->default_umode);
MyFree(p);
--connClassAllocCount;
}
Index: ircu2.10/ircd/ircd_parser.y
diff -u ircu2.10/ircd/ircd_parser.y:1.45 ircu2.10/ircd/ircd_parser.y:1.46
--- ircu2.10/ircd/ircd_parser.y:1.45 Fri Apr 15 18:53:11 2005
+++ ircu2.10/ircd/ircd_parser.y Sat Apr 16 06:17:19 2005
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
- * $Id: ircd_parser.y,v 1.45 2005/04/16 01:53:11 entrope Exp $
+ * $Id: ircd_parser.y,v 1.46 2005/04/16 13:17:19 entrope Exp $
*/
%{
@@ -342,6 +342,7 @@
struct ConnectionClass *c_class;
add_class(name, tping, tconn, maxlinks, sendq);
c_class = find_class(name);
+ MyFree(c_class->default_umode);
c_class->default_umode = pass;
memcpy(&c_class->privs, &privs, sizeof(c_class->privs));
memcpy(&c_class->privs_dirty, &privs_dirty, sizeof(c_class->privs_dirty));
Index: ircu2.10/ircd/s_conf.c
diff -u ircu2.10/ircd/s_conf.c:1.73 ircu2.10/ircd/s_conf.c:1.74
--- ircu2.10/ircd/s_conf.c:1.73 Fri Apr 8 20:37:15 2005
+++ ircu2.10/ircd/s_conf.c Sat Apr 16 06:17:19 2005
@@ -19,7 +19,7 @@
*/
/** @file
* @brief ircd configuration file driver
- * @version $Id: s_conf.c,v 1.73 2005/04/09 03:37:15 entrope Exp $
+ * @version $Id: s_conf.c,v 1.74 2005/04/16 13:17:19 entrope Exp $
*/
#include "config.h"
@@ -150,11 +150,14 @@
aconf->address.port));
if (aconf->dns_pending)
delete_resolver_queries(aconf);
+ MyFree(aconf->username);
MyFree(aconf->host);
+ MyFree(aconf->origin_name);
if (aconf->passwd)
memset(aconf->passwd, 0, strlen(aconf->passwd));
MyFree(aconf->passwd);
MyFree(aconf->name);
+ MyFree(aconf->hub_limit);
MyFree(aconf);
#ifdef DEBUGMODE
--GlobalConfCount;
@@ -1020,7 +1023,7 @@
break;
if (deny->flags & DENY_FLAGS_REALNAME) { /* K: by real name */
- if (0 == match(deny->hostmask + 2, realname))
+ if (0 == match(deny->hostmask, realname))
break;
} else if (deny->flags & DENY_FLAGS_IP) { /* k: by IP */
#ifdef DEBUGMODE
----------------------- End of diff -----------------------