From 59c2bf0fe8329e2653c12a95e486fdfe8a373389 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Fri, 7 Aug 2009 16:44:51 +0000 Subject: - Fix a memory leak when filtering the server variables - Fix a memory leak in MCPResult.m's stringFromCString: - Display the number of server variables being display when a filter is being applied --- Frameworks/MCPKit/MCPFoundationKit/MCPResult.m | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Frameworks') diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPResult.m b/Frameworks/MCPKit/MCPFoundationKit/MCPResult.m index 2fb15a88..333c8327 100644 --- a/Frameworks/MCPKit/MCPFoundationKit/MCPResult.m +++ b/Frameworks/MCPKit/MCPFoundationKit/MCPResult.m @@ -1105,12 +1105,11 @@ const OUR_CHARSET our_charsets60[] = return @""; } - theData = [NSData dataWithBytes:theCString length:(strlen(theCString))]; + theData = [[NSData alloc] initWithBytes:theCString length:(strlen(theCString))]; theString = [[NSString alloc] initWithData:theData encoding:mEncoding]; - if (theString) { - [theString autorelease]; - } + if (theData) [theData release]; + if (theString) [theString autorelease]; return theString; } -- cgit v1.2.3