MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL() leaks an NSMutableArray
[WebKit-https.git] / Source / WebCore / ChangeLog
index b9ada941aabf214b2b3bb1aecf95f21145acb7b4..e39f71506e7fe3f857c5c0b8947d2e2759fcd5f6 100644 (file)
@@ -1,3 +1,21 @@
+2014-06-19  David Kilzer  <ddkilzer@apple.com>
+
+        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.
+
 2014-06-18  Zan Dobersek  <zdobersek@igalia.com>
 
         ScriptExecutionContext::Task, FileThread::Task parameters should be values