From e93d9df70e29e53c4588a6d49bf3a056ac56e9db Mon Sep 17 00:00:00 2001 From: Bibiko Date: Fri, 29 Oct 2010 20:06:44 +0000 Subject: =?UTF-8?q?=E2=80=A2=20convert=20the=20Field=20Editor=20Sheet=20in?= =?UTF-8?q?to=20a=20document-modal=20sheet,=20i.e.=20now=20the=20sheet=20?= =?UTF-8?q?=20doesn't=20block=20the=20entire=20app=20-=20fixed=20various?= =?UTF-8?q?=20layout=20issues=20-=20fixed=20some=20tiny=20memory=20leaks?= =?UTF-8?q?=20=E2=80=A2=20fixed=20tiny=20memory=20leak=20in=20MCPStreaming?= =?UTF-8?q?Result?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'Frameworks/MCPKit') diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m b/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m index d26dbafc..c15db6c6 100644 --- a/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m +++ b/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m @@ -246,11 +246,6 @@ void _bytes2bin(Byte *n, NSUInteger nbytes, NSUInteger len, char *buf); } } - // If the field is of type BIT, then allocate the binary buffer - if (fieldDefinitions[i].type == FIELD_TYPE_BIT) { - buf = malloc(fieldDefinitions[i].length + 1); - } - // If the data hasn't already been detected as NULL - in which case it will have been // set to NSNull - process the data by type @@ -293,6 +288,8 @@ void _bytes2bin(Byte *n, NSUInteger nbytes, NSUInteger len, char *buf); case FIELD_TYPE_BIT: // Get a binary representation of the data + + buf = malloc(fieldDefinitions[i].length + 1); _bytes2bin(theData, fieldLengths[i], fieldDefinitions[i].length, buf); cellData = (theData != NULL) ? [NSString stringWithUTF8String:buf] : @""; -- cgit v1.2.3