X-Git-Url: http://git.ithinksw.org/ITFoundation.git/blobdiff_plain/ba38a33a2b82f8adb39fdd5b40e2da5d42913fbd..574cd9566e6e9ecd29c1e435d4636d406aa57017:/ITAppleEventTools.m diff --git a/ITAppleEventTools.m b/ITAppleEventTools.m index fe76e1a..2677636 100755 --- a/ITAppleEventTools.m +++ b/ITAppleEventTools.m @@ -112,7 +112,8 @@ NSAppleEventDescriptor *ITSendAEWithKey(FourCharCode reqKey, FourCharCode evClas unsigned char *chr = (unsigned char *)malloc(4*sizeof(unsigned char)); memcpy(chr, &reqKey, 4); NSString *sendString = [NSString stringWithFormat:@"'----':obj { form:'prop', want:type('prop'), seld:type('%s'), from:'null'() }", chr]; - const char *usendString = [sendString UTF8String]; + free(chr); + const char *usendString = [sendString UTF8String]; AppleEvent sendEvent, replyEvent; NSAppleEventDescriptor *send, *recv;