Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: media/audio/pulse/pulse_input.cc

Issue 520613003: Fix memory leaks related to PulseAudioInputStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/pulse/pulse_input.cc
diff --git a/media/audio/pulse/pulse_input.cc b/media/audio/pulse/pulse_input.cc
index 6c9855e504c568bf47771ae04e6470c5f06ac061..9e99a5bb83566b16160d9f8c885ed9cd7699090d 100644
--- a/media/audio/pulse/pulse_input.cc
+++ b/media/audio/pulse/pulse_input.cc
@@ -119,7 +119,9 @@ void PulseAudioInputStream::Close() {
if (handle_) {
// Disable all the callbacks before disconnecting.
pa_stream_set_state_callback(handle_, NULL, NULL);
- pa_stream_flush(handle_, NULL, NULL);
+ pa_operation* operation = pa_stream_flush(handle_, NULL, NULL);
DaleCurtis 2014/08/29 17:07:48 Just use WaitForOperationCompletion here.
+ if (operation)
+ pa_operation_unref(operation);
if (pa_stream_get_state(handle_) != PA_STREAM_UNCONNECTED)
pa_stream_disconnect(handle_);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698