Kaydet (Commit) 965f58fa authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Fix heap corruption

As its name says, CFDictionaryGetValue() follows "The Get Rule",
i.e. you don't have ownership of the object returned, so it shouldn't
be released.

Change-Id: Ie605ac21754ed479911d8f4ceb00744a6df600aa
üst 5f18619f
...@@ -76,7 +76,6 @@ static bool GetDevFontAttributes( CTFontDescriptorRef font_descriptor, ImplDevFo ...@@ -76,7 +76,6 @@ static bool GetDevFontAttributes( CTFontDescriptorRef font_descriptor, ImplDevFo
CFDictionaryRef traits = (CFDictionaryRef)CTFontDescriptorCopyAttribute(font_descriptor, kCTFontTraitsAttribute); CFDictionaryRef traits = (CFDictionaryRef)CTFontDescriptorCopyAttribute(font_descriptor, kCTFontTraitsAttribute);
CFNumberRef symbolics = (CFNumberRef)CFDictionaryGetValue(traits, kCTFontSymbolicTrait); CFNumberRef symbolics = (CFNumberRef)CFDictionaryGetValue(traits, kCTFontSymbolicTrait);
CFNumberGetValue(symbolics, kCFNumberIntType, &value); CFNumberGetValue(symbolics, kCFNumberIntType, &value);
CFRelease(symbolics);
if(value & kCTFontMonoSpaceTrait) if(value & kCTFontMonoSpaceTrait)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment