Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumblekit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Eby <sean.eby@gmail.com>2019-07-10 02:53:42 +0300
committerGitHub <noreply@github.com>2019-07-10 02:53:42 +0300
commit66a533182a6117aeab404cca1dd688f0bac5237a (patch)
tree6dca9c53c83490473a9ffa8fb64d3897377ac702
parentc1fa79d2b2e792563ef2acfcb6ff2e8aae719e54 (diff)
Fix memory leak in MKConnection allocating MKCryptState
When an MKConnection object is destroyed/deallocated, the allocated MKCryptState from the main() thread does not get released. It only gets released and re-allocated in the do/while loop itself but it also needs to be released when the while() condition eventually falls out.
-rw-r--r--src/MKConnection.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/MKConnection.m b/src/MKConnection.m
index aeca86f..4735993 100644
--- a/src/MKConnection.m
+++ b/src/MKConnection.m
@@ -243,6 +243,8 @@ static void MKConnectionUDPCallback(CFSocketRef sock, CFSocketCallBackType type,
[[MKAudio sharedAudio] setMainConnectionForAudio:nil];
} while (_reconnect);
+
+ [_crypt release];
[NSThread exit];
}
@@ -1284,4 +1286,4 @@ out:
return _shouldUseOpus;
}
-@end \ No newline at end of file
+@end