diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-05-10 19:20:31 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-05-10 19:20:31 +0000 |
commit | 571ff82f6922e7e44a8f242ac60114e7c8972024 (patch) | |
tree | 771127e56f1008cdbb03d6754384732a790985f0 /src | |
parent | 7ddc6d8be53b7020faf88796e6d0987eb5ba2b7c (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
Diffstat (limited to 'src')
-rw-r--r-- | src/protocol/unreal32.c | 7 |
1 files changed, 5 insertions, 2 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; } |