diff options
author | certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-06-16 21:31:20 +0000 |
---|---|---|
committer | certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-06-16 21:31:20 +0000 |
commit | ee9aa52d7fc4782b79748bc144145651e070d335 (patch) | |
tree | 7fbd54ea81204ff214c6b1ffd3007be4a0aeb150 | |
parent | 2eee213724d50fd77dcd9538fe68827562b9d841 (diff) |
# BUILD : 1.7.14 (1052) # BUGS : # NOTES : Fixed several memleaks in ns_noop.c. Certus 4 teh win!
git-svn-id: svn://svn.anope.org/anope/trunk@1055 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@779 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | src/modules/ns_noop.c | 16 | ||||
-rw-r--r-- | version.log | 6 |
3 files changed, 18 insertions, 5 deletions
@@ -26,6 +26,7 @@ Provided by Anope Dev. <dev@anope.org> - 2006 06/14 F Changed mysql detection to use mysql_config. [ #00] 06/15 F OpenBSD Config issue. [#519] 06/15 F langcomp with _GNU_SOURCES defined. [ #00] +06/16 F Fixed several memleaks in ns_noop.c. [ #00] Provided by ThaPrince <jon@vile.com> - 2006 05/19 A Plexus 3 support. [ #00] diff --git a/src/modules/ns_noop.c b/src/modules/ns_noop.c index 7ab163fc3..26836c25b 100644 --- a/src/modules/ns_noop.c +++ b/src/modules/ns_noop.c @@ -135,8 +135,10 @@ int noop(User * u) moduleNoticeLang(s_NickServ, u, AUTOOP_NO_NICK); } else if (!toggleStr) { if ((na = findnick(u->nick))) { - if (moduleGetData(&na->nc->moduleData, "autoop")) { + char *tmpstr = NULL; + if (tmpstr = moduleGetData(&na->nc->moduleData, "autoop")) { moduleNoticeLang(s_NickServ, u, AUTOOP_STATUS_OFF); + free(tmpstr); } else { moduleNoticeLang(s_NickServ, u, AUTOOP_STATUS_ON); } @@ -213,21 +215,25 @@ int mEventJoin(int argc, char **argv) /* Blame Rob if this user->na should be findnick(user->nick); -GD */ if (user && (na = user->na)) { if (strcmp(argv[0], EVENT_START) == 0) { - if (moduleGetData(&na->nc->moduleData, "autoop")) { + char *tmpstr = NULL; + if (tmpstr = moduleGetData(&na->nc->moduleData, "autoop")) { currentUser = user; if (is_oper(user)) { user->mode &= ~(anope_get_oper_mode()); m_isIRCop = 1; } add_ignore(user->nick, 120); + free(tmpstr); } } else { + char *tmpstr = NULL; /* Does the user have the autoop info in his moduleData? */ - if (moduleGetData(&na->nc->moduleData, "autoop")) { + if (tmpstr = moduleGetData(&na->nc->moduleData, "autoop")) { /* The most dirty solution ever! - doc */ if (m_isIRCop) user->mode |= anope_get_oper_mode(); delete_ignore(user->nick); + free(tmpstr); } } } @@ -296,9 +302,11 @@ int mSaveData(int argc, char **argv) } else { for (i = 0; i < 1024; i++) { for (nc = nclists[i]; nc; nc = nc->next) { + char *tmpstr = NULL; /* If we have any info on this user */ - if (moduleGetData(&nc->moduleData, "autoop")) { + if (tmpstr = moduleGetData(&nc->moduleData, "autoop")) { fprintf(out, "%s\n", nc->display); + free(tmpstr); } } } diff --git a/version.log b/version.log index 3157ba4c6..17c6ccf83 100644 --- a/version.log +++ b/version.log @@ -9,10 +9,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="14" VERSION_EXTRA="" -VERSION_BUILD="1051" +VERSION_BUILD="1052" # $Log$ # +# BUILD : 1.7.14 (1052) +# BUGS : +# NOTES : Fixed several memleaks in ns_noop.c. Certus 4 teh win! +# # BUILD : 1.7.14 (1051) # BUGS : # NOTES : Changed mysql detection to use mysql_config instead of home brewn mysql.m4 |