Title: [146571] trunk/Source/WebCore
Revision
146571
Author
[email protected]
Date
2013-03-22 01:07:38 -0700 (Fri, 22 Mar 2013)

Log Message

[GStreamer] Memory leak in AudioFileReader::createBus()
https://bugs.webkit.org/show_bug.cgi?id=112925

Patch by Sudarsana Nagineni <[email protected]> on 2013-03-22
Reviewed by Martin Robinson.

Adopt the reference returned by g_timeout_source_new()
to fix a memory leak.

No new tests. No change in behavior.

* platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(WebCore::AudioFileReader::createBus):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (146570 => 146571)


--- trunk/Source/WebCore/ChangeLog	2013-03-22 07:52:09 UTC (rev 146570)
+++ trunk/Source/WebCore/ChangeLog	2013-03-22 08:07:38 UTC (rev 146571)
@@ -1,3 +1,18 @@
+2013-03-22  Sudarsana Nagineni  <[email protected]>
+
+        [GStreamer] Memory leak in AudioFileReader::createBus()
+        https://bugs.webkit.org/show_bug.cgi?id=112925
+
+        Reviewed by Martin Robinson.
+
+        Adopt the reference returned by g_timeout_source_new()
+        to fix a memory leak.
+
+        No new tests. No change in behavior.
+
+        * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
+        (WebCore::AudioFileReader::createBus):
+
 2013-03-22  Steve Block  <[email protected]>
 
         Move page/Coordinates.[h|idl] to Modules/geolocation/

Modified: trunk/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp (146570 => 146571)


--- trunk/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp	2013-03-22 07:52:09 UTC (rev 146570)
+++ trunk/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp	2013-03-22 08:07:38 UTC (rev 146571)
@@ -458,9 +458,9 @@
     m_loop = adoptGRef(g_main_loop_new(context.get(), FALSE));
 
     // Start the pipeline processing just after the loop is started.
-    GSource* timeoutSource = g_timeout_source_new(0);
-    g_source_attach(timeoutSource, context.get());
-    g_source_set_callback(timeoutSource, reinterpret_cast<GSourceFunc>(enteredMainLoopCallback), this, 0);
+    GRefPtr<GSource> timeoutSource = adoptGRef(g_timeout_source_new(0));
+    g_source_attach(timeoutSource.get(), context.get());
+    g_source_set_callback(timeoutSource.get(), reinterpret_cast<GSourceFunc>(enteredMainLoopCallback), this, 0);
 
     g_main_loop_run(m_loop.get());
     g_main_context_pop_thread_default(context.get());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to