summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-08-10 15:47:42 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-08-10 15:47:42 +0000
commitb70fa90b8dd2c8652f6c1b9e471e2940bcaed29e (patch)
tree35feed0e3c3065ae0d79463cd071ba3509987cac
parent866d7cc99bb78ae069987e2894580d8ed15c83f0 (diff)
BUILD : 1.7.10 (851) BUGS : NOTES : Fixed a few memleaks in os_info (thanks Certus)
git-svn-id: svn://svn.anope.org/anope/trunk@851 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@604 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--Changes1
-rw-r--r--src/modules/os_info.c31
-rw-r--r--version.log6
3 files changed, 21 insertions, 17 deletions
diff --git a/Changes b/Changes
index ba6177c0d..2badf1f66 100644
--- a/Changes
+++ b/Changes
@@ -5,6 +5,7 @@ Provided by Anope Dev. <dev@anope.org> - 2005
07/01 A Events for channel access/xop updates. [ #00]
06/26 A New module pack module: hs_request. [ #00]
06/03 A Protocol files can now fill mod_current_buffer with custom code. [#389]
+08/10 F Few memleaks in bundled os_info module. [ #00]
08/07 F NS SET sometimes seeing options as nicks. [ #00]
08/05 F Bot max nick length limited by NICKMAX now. [ #00]
07/07 F Typing mistake in module error message. [ #00]
diff --git a/src/modules/os_info.c b/src/modules/os_info.c
index ed0b13c8e..bbb308535 100644
--- a/src/modules/os_info.c
+++ b/src/modules/os_info.c
@@ -271,6 +271,7 @@ int myNickInfo(User * u)
{
char *text = NULL;
char *nick = NULL;
+ char *info = NULL;
NickAlias *na = NULL;
/* Only show our goodies to opers */
@@ -283,10 +284,9 @@ int myNickInfo(User * u)
/* ok we've found the user */
if ((na = findnick(nick))) {
/* If we have any info on this user */
- if (moduleGetData(&na->nc->moduleData, "info")) {
- notice_user(s_NickServ, u, " OperInfo: %s",
- moduleGetData(&na->nc->moduleData,
- "info"));
+ if ((info = moduleGetData(&na->nc->moduleData, "info"))) {
+ notice_user(s_NickServ, u, " OperInfo: %s", info);
+ free(info);
}
/* NickCore not found! */
} else {
@@ -308,6 +308,7 @@ int myChanInfo(User * u)
{
char *text = NULL;
char *chan = NULL;
+ char *info = NULL;
ChannelInfo *ci = NULL;
/* Only show our goodies to opers */
@@ -319,10 +320,9 @@ int myChanInfo(User * u)
if (chan) {
if ((ci = cs_findchan(chan))) {
/* If we have any info on this channel */
- if (moduleGetData(&ci->moduleData, "info")) {
- notice_user(s_ChanServ, u, " OperInfo: %s",
- moduleGetData(&ci->moduleData,
- "info"));
+ if ((info = moduleGetData(&ci->moduleData, "info"))) {
+ notice_user(s_ChanServ, u, " OperInfo: %s", info);
+ free(info);
}
}
free(chan);
@@ -403,6 +403,7 @@ int mSaveData(int argc, char **argv)
int i = 0;
int ret = 0;
FILE *out;
+ char *info = NULL;
if (argc >= 1) {
if (!stricmp(argv[0], EVENT_START)) {
@@ -415,10 +416,9 @@ int mSaveData(int argc, char **argv)
for (i = 0; i < 1024; i++) {
for (nc = nclists[i]; nc; nc = nc->next) {
/* If we have any info on this user */
- if (moduleGetData(&nc->moduleData, "info")) {
- fprintf(out, "N %s %s\n", nc->display,
- moduleGetData(&nc->moduleData,
- "info"));
+ if ((info = moduleGetData(&nc->moduleData, "info"))) {
+ fprintf(out, "N %s %s\n", nc->display, info);
+ free(info);
}
}
}
@@ -427,10 +427,9 @@ int mSaveData(int argc, char **argv)
for (i = 0; i < 256; i++) {
for (ci = chanlists[i]; ci; ci = ci->next) {
/* If we have any info on this channel */
- if (moduleGetData(&ci->moduleData, "info")) {
- fprintf(out, "C %s %s\n", ci->name,
- moduleGetData(&ci->moduleData,
- "info"));
+ if ((info = moduleGetData(&ci->moduleData, "info"))) {
+ fprintf(out, "C %s %s\n", ci->name, info);
+ free(info);
}
}
}
diff --git a/version.log b/version.log
index 849205c97..ebd385db6 100644
--- a/version.log
+++ b/version.log
@@ -8,10 +8,14 @@
VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="10"
-VERSION_BUILD="850"
+VERSION_BUILD="851"
# $Log$
#
+# BUILD : 1.7.10 (851)
+# BUGS :
+# NOTES : Fixed a few memleaks in os_info (thanks Certus)
+#
# BUILD : 1.7.10 (850)
# BUGS :
# NOTES : Fixed NS SET sometimes using the option as nick if it existed and updated docs/NEWS for 1.7