Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Branch tags: u2_10_12_branch
Commit time: 2006-06-30 15:52:29 UTC
Modified files:
Tag: u2_10_12_branch
ChangeLog ircd/s_auth.c
Log message:
Fix two authorization stage memory leaks.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.710.2.115 ircu2.10/ChangeLog:1.710.2.116
--- ircu2.10/ChangeLog:1.710.2.115 Mon Jun 26 16:44:22 2006
+++ ircu2.10/ChangeLog Fri Jun 30 08:52:17 2006
@@ -1,3 +1,9 @@
+2006-06-30 Michael Poole <[EMAIL PROTECTED]>
+
+ * ircd/s_auth.c (check_auth_finished): Free auth structure when
+ done with it.
+ (sendto_iauth): Free message buffer when done with it.
+
2006-06-26 Michael Poole <[EMAIL PROTECTED]>
* include/patchlevel.h (PATCHLEVEL): Bump for pre08.
Index: ircu2.10/ircd/s_auth.c
diff -u ircu2.10/ircd/s_auth.c:1.37.2.17 ircu2.10/ircd/s_auth.c:1.37.2.18
--- ircu2.10/ircd/s_auth.c:1.37.2.17 Wed Jun 7 18:58:36 2006
+++ ircu2.10/ircd/s_auth.c Fri Jun 30 08:52:18 2006
@@ -31,7 +31,7 @@
*/
/** @file
* @brief Implementation of DNS and ident lookups.
- * @version $Id: s_auth.c,v 1.37.2.17 2006/06/08 01:58:36 entrope Exp $
+ * @version $Id: s_auth.c,v 1.37.2.18 2006/06/30 15:52:18 entrope Exp $
*/
#include "config.h"
@@ -427,11 +427,15 @@
destroy_auth_request(auth);
if (!IsUserPort(auth->client))
- return 0;
- memset(cli_passwd(auth->client), 0, sizeof(cli_passwd(auth->client)));
- res = auth_set_username(auth);
- if (res == 0)
+ {
+ memset(cli_passwd(auth->client), 0, sizeof(cli_passwd(auth->client)));
+ res = auth_set_username(auth);
+ if (res == 0)
res = register_user(auth->client, auth->client);
+ }
+ else
+ res = 0;
+ MyFree(auth);
return res;
}
@@ -1399,6 +1403,7 @@
/* Tack it onto the iauth sendq and try to write it. */
++iauth->i_sendM;
msgq_add(i_sendQ(iauth), mb, 0);
+ msgq_clean(mb);
iauth_write(iauth);
return 1;
}
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches