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 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/protocol') 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; } -- cgit