iOS: Fix resource leak

This commit is contained in:
Martin Fleisz 2013-04-18 10:51:39 +02:00
parent ce4e02ae48
commit dd5cbef467
2 changed files with 4 additions and 4 deletions

View File

@ -221,7 +221,9 @@ ios_run_freerdp(freerdp * instance)
[pool release]; pool = nil;
}
CGContextRelease(mfi->bitmap_context);
mfi->bitmap_context = NULL;
mfi->connection_state = TSXConnectionDisconnected;
// Cleanup

View File

@ -190,9 +190,7 @@ NSString* TSXSessionDidFailToConnectNotification = @"TSXSessionDidFailToConnect"
- (CGContextRef)bitmapContext
{
if ([self mfi]->connection_state == TSXConnectionConnected)
return [self mfi]->bitmap_context;
return NULL;
return [self mfi]->bitmap_context;
}
#pragma mark -