summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-05-10 19:20:31 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-05-10 19:20:31 +0000
commit571ff82f6922e7e44a8f242ac60114e7c8972024 (patch)
tree771127e56f1008cdbb03d6754384732a790985f0
parent7ddc6d8be53b7020faf88796e6d0987eb5ba2b7c (diff)
Fixed a memory leak and use of uninitialized values in unreal_jointhrottle_mode_check. Note we don't even use this function currently.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2947 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--src/protocol/unreal32.c7
-rw-r--r--version.log3
2 files changed, 7 insertions, 3 deletions
diff --git a/src/protocol/unreal32.c b/src/protocol/unreal32.c
index 083e64615..8ecfc90e9 100644
--- a/src/protocol/unreal32.c
+++ b/src/protocol/unreal32.c
@@ -1878,9 +1878,12 @@ int unreal_jointhrottle_mode_check(char *value)
if (one && two) {
param1 = atoi(one);
param2 = atoi(two);
+ if ((param1 >= 1) && (param1 <= 255) && (param2 >= 1) && (param2 <= 999)) {
+ free(tempValue);
+ return 1;
+ }
}
- if ((param1 >= 1) && (param1 <= 255) && (param2 >= 1) && (param2 <= 999))
- return 1;
+ free(tempValue);
return 0;
}
diff --git a/version.log b/version.log
index 439a08fe2..e32865f78 100644
--- a/version.log
+++ b/version.log
@@ -9,9 +9,10 @@ VERSION_MAJOR="1"
VERSION_MINOR="8"
VERSION_PATCH="4"
VERSION_EXTRA="-svn"
-VERSION_BUILD="2946"
+VERSION_BUILD="2947"
# $Log$ # Changes since the 1.8.4 Release
+#Revision 2947 - Fixed a memory leak and use of uninitialized values in unreal_jointhrottle_mode_check. Note we don't even use this function currently.
#Revision 2946 - Fixed bug #1161 - Fixed setting expiry times on akills in the atheme2anope database converter
#Revision 2943 - Added an Atheme to Anope database converter
#Revision 2935 - Fixed unloading modules commands, fixes a crash introduced by the last commit