1
0
mirror of https://github.com/anope/anope.git synced 2026-07-04 13:33:13 +02:00

Fix memleak in channels.c from DukePyrolator. (Same fix applied to 1.9 earlier). Thanks DP!

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2182 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
sjaz
2009-03-22 09:40:57 +00:00
parent 2af1c0a5e9
commit 9d7edd3055
+13 -5
View File
@@ -768,7 +768,7 @@ void do_sjoin(const char *source, int ac, char **av)
Server *serv;
struct c_userlist *cu;
char *s = NULL;
char *end, cubuf[7], *end2, *cumodes[6];
char *end, cubuf[7], *end2, *cumodes[6], *buf;
int is_sqlined = 0;
int ts = 0;
int is_created = 0;
@@ -828,7 +828,10 @@ void do_sjoin(const char *source, int ac, char **av)
if (ircd->sjoinbanchar) {
if (*s == ircd->sjoinbanchar && keep_their_modes) {
add_ban(c, myStrGetToken(s, ircd->sjoinbanchar, 1));
buf = myStrGetToken(s, ircd->sjoinbanchar, 1);
add_ban(c, buf);
if (buf)
free(buf);
if (!end)
break;
s = end + 1;
@@ -837,8 +840,10 @@ void do_sjoin(const char *source, int ac, char **av)
}
if (ircd->sjoinexchar) {
if (*s == ircd->sjoinexchar && keep_their_modes) {
add_exception(c,
myStrGetToken(s, ircd->sjoinexchar, 1));
buf = myStrGetToken(s, ircd->sjoinexchar, 1);
add_exception(c, buf);
if (buf)
free(buf);
if (!end)
break;
s = end + 1;
@@ -848,7 +853,10 @@ void do_sjoin(const char *source, int ac, char **av)
if (ircd->sjoininvchar) {
if (*s == ircd->sjoininvchar && keep_their_modes) {
add_invite(c, myStrGetToken(s, ircd->sjoininvchar, 1));
buf = myStrGetToken(s, ircd->sjoininvchar, 1);
add_invite(c, buf);
if (buf)
free(buf);
if (!end)
break;
s = end + 1;