Bug 132106

Summary: [Cocoa] fix CF leaks found by code inspection
Product: WebKit Reporter: Darin Adler <darin>
Component: WebKit Misc.Assignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, glenn, jer.noble, mmaxfield, philipj, sergio
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch kling: review+, kling: commit-queue-

Description Darin Adler 2014-04-23 21:11:31 PDT
[Cocoa] fix CF leaks found by code inspection
Comment 1 Darin Adler 2014-04-23 21:14:46 PDT
Created attachment 230044 [details]
Patch
Comment 2 Andreas Kling 2014-04-23 21:27:27 PDT
Comment on attachment 230044 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=230044&action=review

r=me. Nice finds!

> Source/WebCore/plugins/mac/PluginPackageMac.cpp:138
> +        RetainPtr<CFStringRef> homeDir = adoptCF(homeDirectoryPath().createCFString());

We don't need adoptCF() here; createCFString() returns a RetainPtr<CFStringRef>.

> Source/WebCore/plugins/mac/PluginPackageMac.cpp:255
> +    RetainPtr<CFStringRef> path = adoptCF(m_path.createCFString());

Ditto.
Comment 3 Darin Adler 2014-04-23 21:46:52 PDT
Committed r167746: <http://trac.webkit.org/changeset/167746>
Comment 4 Darin Adler 2014-04-23 21:47:25 PDT
Comment on attachment 230044 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=230044&action=review

>> Source/WebCore/plugins/mac/PluginPackageMac.cpp:138
>> +        RetainPtr<CFStringRef> homeDir = adoptCF(homeDirectoryPath().createCFString());
> 
> We don't need adoptCF() here; createCFString() returns a RetainPtr<CFStringRef>.

Not even sure how this compiles.
Comment 5 Darin Adler 2014-04-23 21:48:42 PDT
*** Bug 132108 has been marked as a duplicate of this bug. ***