git.ithinksw.org
/
ITFoundation.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba38a33
)
fix malloc leak
author
Alexander Strange
<astrange@ithinksw.com>
Fri, 10 Sep 2004 20:25:50 +0000
(20:25 +0000)
committer
Alexander Strange
<astrange@ithinksw.com>
Fri, 10 Sep 2004 20:25:50 +0000
(20:25 +0000)
ITAppleEventTools.m
patch
|
blob
|
history
diff --git
a/ITAppleEventTools.m
b/ITAppleEventTools.m
index
fe76e1a
..
2677636
100755
(executable)
--- 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;