MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL() leaks an NSMutableArray
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jun 2014 16:22:51 +0000 (16:22 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jun 2014 16:22:51 +0000 (16:22 +0000)
commita83068f3be3d7626dba59b43d27531ddc4d44d8d
tree0bfa9101b746a7b531b4e7fa6413680a813d1de1
parentcc4aaba6e3d571ed7b6a0aae1a9af07744f8e320
MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL() leaks an NSMutableArray
<http://webkit.org/b/134052>

Reviewed by Eric Carlson.

Fixes the following static analyzer warning:

    WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:688:43: warning: Potential leak of an object stored into 'outOfBandTracks'
            NSMutableArray* outOfBandTracks = [[NSMutableArray alloc] init];
                                              ^

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
Use RetainPtr<NSMutableArray> to prevent a leak.  Use
Objective-C literals to clean up the code.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170146 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm