Bug 148668 - Possible CFArray leak in MediaPlayerPrivateAVFoundationCF.cpp
Summary: Possible CFArray leak in MediaPlayerPrivateAVFoundationCF.cpp
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Joseph Pecoraro
Depends on:
Reported: 2015-08-31 21:09 PDT by Joseph Pecoraro
Modified: 2015-09-01 08:49 PDT (History)
4 users (show)

See Also:

[PATCH] Proposed Fix (4.42 KB, patch)
2015-08-31 21:23 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[PATCH] Proposed Fix (4.38 KB, patch)
2015-08-31 21:27 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2015-08-31 21:09:08 PDT
Possible CFArray leak in MediaPlayerPrivateAVFoundationCF.cpp:

    RetainPtr<CFArrayRef> avTypes = AVCFURLAssetCopyAudiovisualMIMETypes();

Normally when assigning a "Copy" into a RetainPtr<T> we should adopt.
Comment 1 Joseph Pecoraro 2015-08-31 21:13:41 PDT
Interesting, it seems like two function nearly right next to each other are nearly identical:

    static const HashSet<String>& avfMIMETypes()
    static const HashSet<String>& mimeTypeCache()

Maybe they can be merged.
Comment 2 Joseph Pecoraro 2015-08-31 21:18:47 PDT
The only different seems to be, one has lowercase strings, and the other doesn't.

However, MediaPlayerPrivateAVFoundationObjC only has one implementation, and it does the lowercase strings, so I'll combine to just that one.
Comment 3 Joseph Pecoraro 2015-08-31 21:23:26 PDT
Created attachment 260349 [details]
[PATCH] Proposed Fix
Comment 4 WebKit Commit Bot 2015-08-31 21:24:55 PDT
Attachment 260349 [details] did not pass style-queue:

ERROR: Source/WebCore/ChangeLog:8:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
Total errors found: 1 in 2 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Joseph Pecoraro 2015-08-31 21:27:45 PDT
Created attachment 260350 [details]
[PATCH] Proposed Fix
Comment 6 WebKit Commit Bot 2015-09-01 08:49:56 PDT
Comment on attachment 260350 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 260350

Committed r189209: <http://trac.webkit.org/changeset/189209>
Comment 7 WebKit Commit Bot 2015-09-01 08:49:58 PDT
All reviewed patches have been landed.  Closing bug.