Bug 132106 - [Cocoa] fix CF leaks found by code inspection
Summary: [Cocoa] fix CF leaks found by code inspection
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
: 132108 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-04-23 21:11 PDT by Darin Adler
Modified: 2014-04-23 21:48 PDT (History)
7 users (show)

See Also:


Attachments
Patch (18.82 KB, patch)
2014-04-23 21:14 PDT, Darin Adler
kling: review+
kling: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***