From 571ff82f6922e7e44a8f242ac60114e7c8972024 Mon Sep 17 00:00:00 2001 From: Adam- Date: Mon, 10 May 2010 19:20:31 +0000 Subject: 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 --- src/protocol/unreal32.c | 7 +++++-- version.log | 3 ++- 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 -- cgit