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:
authorMikkel Krautz <mikkel@krautz.dk>2011-08-07 02:25:06 +0400
committerMikkel Krautz <mikkel@krautz.dk>2011-08-07 02:25:06 +0400
commit5f0d91fa93cb317718e93a1e3c2a428d7eef8cc5 (patch)
treef89108324655556bdb3403a0430e424cf7c73e61 /src/MKConnection.m
parent09fd5aa745b00cbdf3e31147837ee974f7127567 (diff)
Clang analyzer run.
Diffstat (limited to 'src/MKConnection.m')
-rw-r--r--src/MKConnection.m8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/MKConnection.m b/src/MKConnection.m
index 1567101..4b8f521 100644
--- a/src/MKConnection.m
+++ b/src/MKConnection.m
@@ -509,6 +509,7 @@ static void MKConnectionUDPCallback(CFSocketRef sock, CFSocketCallBackType type,
// Add the UDP socket to the runloop of the MKConnection thread.
CFRunLoopSourceRef src = CFSocketCreateRunLoopSource(NULL, _udpSock, 0);
CFRunLoopAddSource(CFRunLoopGetCurrent(), src, kCFRunLoopDefaultMode);
+ CFRelease(src);
// Get the peer address of the TCP socket (i.e. the host)
struct sockaddr sa;
@@ -518,13 +519,12 @@ static void MKConnectionUDPCallback(CFSocketRef sock, CFSocketCallBackType type,
return;
}
- NSData *_udpAddr = [[NSData alloc] initWithBytes:&sa length:(NSUInteger)sl];
+ NSData *_udpAddr = [[[NSData alloc] initWithBytes:&sa length:(NSUInteger)sl] autorelease];
CFSocketError err = CFSocketConnectToAddress(_udpSock, (CFDataRef)_udpAddr, -1);
if (err == kCFSocketError) {
NSLog(@"MKConnection: Unable to CFSocketConnectToAddress()");
return;
}
- [_udpAddr release];
}
// Tear down the UDP connection-part of an MKConnection.
@@ -578,6 +578,7 @@ static void MKConnectionUDPCallback(CFSocketRef sock, CFSocketCallBackType type,
[_peerCertificates addObject:[MKCertificate certificateWithCertificate:data privateKey:nil]];
[data release];
}];
+ [secCerts release];
return _peerCertificates;
}
@@ -608,8 +609,6 @@ static void MKConnectionUDPCallback(CFSocketRef sock, CFSocketCallBackType type,
if (err != kCFSocketSuccess) {
NSLog(@"MKConnection: CFSocketSendData failed with err=%i", (int)err);
}
-
- [crypted release];
}
// Send a control-channel message to the server. This may be called from any thread,
@@ -688,7 +687,6 @@ static void MKConnectionUDPCallback(CFSocketRef sock, CFSocketCallBackType type,
if ([crypted length] > 4) {
NSData *plain = [_crypt decryptData:crypted];
[self _udpMessageReceived:plain];
- [plain release];
}
}