diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index f8902283c6e..5bc47a74c18 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -1297,9 +1297,7 @@ static NSString *createStringForKeys(const CGKeyCode *keyCode, int length) { return nil; } - CFStringRef chararter = CFStringCreateWithCharacters(kCFAllocatorDefault, chars, 1); - CFStringAppend(output, chararter); - CFRelease(chararter); + CFStringAppendCharacters(output, chars, 1); } //CFStringUppercase(output, NULL);