Title: [120718] trunk/Source/WebCore
Revision
120718
Author
[email protected]
Date
2012-06-19 08:45:05 -0700 (Tue, 19 Jun 2012)

Log Message

[Mac] AudioFileReader::createBus() leaks an AudioBufferList if ExtAudioFileRead() returns an error
https://bugs.webkit.org/show_bug.cgi?id=89429

Reviewed by Darin Adler.

* platform/audio/mac/AudioFileReaderMac.cpp:
(WebCore::AudioFileReader::createBus): Call destroyAudioBufferList()
before returning if ExtAudioFileRead() returns an error.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (120717 => 120718)


--- trunk/Source/WebCore/ChangeLog	2012-06-19 15:40:37 UTC (rev 120717)
+++ trunk/Source/WebCore/ChangeLog	2012-06-19 15:45:05 UTC (rev 120718)
@@ -1,3 +1,14 @@
+2012-06-19  Andy Estes  <[email protected]>
+
+        [Mac] AudioFileReader::createBus() leaks an AudioBufferList if ExtAudioFileRead() returns an error
+        https://bugs.webkit.org/show_bug.cgi?id=89429
+
+        Reviewed by Darin Adler.
+
+        * platform/audio/mac/AudioFileReaderMac.cpp:
+        (WebCore::AudioFileReader::createBus): Call destroyAudioBufferList()
+        before returning if ExtAudioFileRead() returns an error.
+
 2012-06-19  Martin Robinson  <[email protected]>
 
         2012-06-19  Martin Robinson  <[email protected]>

Modified: trunk/Source/WebCore/platform/audio/mac/AudioFileReaderMac.cpp (120717 => 120718)


--- trunk/Source/WebCore/platform/audio/mac/AudioFileReaderMac.cpp	2012-06-19 15:40:37 UTC (rev 120717)
+++ trunk/Source/WebCore/platform/audio/mac/AudioFileReaderMac.cpp	2012-06-19 15:45:05 UTC (rev 120718)
@@ -219,8 +219,10 @@
     // Read from the file (or in-memory version)
     UInt32 framesToRead = numberOfFrames;
     result = ExtAudioFileRead(m_extAudioFileRef, &framesToRead, bufferList);
-    if (result != noErr)
+    if (result != noErr) {
+        destroyAudioBufferList(bufferList);
         return nullptr;
+    }
 
     if (mixToMono && numberOfChannels == 2) {
         // Mix stereo down to mono
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to