[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] protocol-native: Fix format ownership while creating record streams

Tanu Kaskinen gitlab at gitlab.freedesktop.org
Fri Jan 18 16:39:49 UTC 2019


Tanu Kaskinen pushed to branch master at PulseAudio / pulseaudio


Commits:
a5f25af0 by Arun Raghavan at 2019-01-18T16:34:33Z
protocol-native: Fix format ownership while creating record streams

- - - - -


1 changed file:

- src/pulsecore/protocol-native.c


Changes:

=====================================
src/pulsecore/protocol-native.c
=====================================
@@ -516,6 +516,9 @@ static record_stream* record_stream_new(
         pa_sink_input *direct_on_input,
         int *ret) {
 
+    /* Note: This function takes ownership of the 'formats' param, so we need
+     * to take extra care to not leak it */
+
     record_stream *s;
     pa_source_output *source_output = NULL;
     pa_source_output_new_data data;
@@ -2368,6 +2371,8 @@ static void command_create_record_stream(pa_pdispatch *pd, uint32_t command, uin
         (passthrough ? PA_SOURCE_OUTPUT_PASSTHROUGH : 0);
 
     s = record_stream_new(c, source, &ss, &map, formats, &attr, volume_set ? &volume : NULL, muted, muted_set, flags, p, adjust_latency, early_requests, relative_volume, peak_detect, direct_on_input, &ret);
+    /* We no longer own the formats idxset */
+    formats = NULL;
 
     CHECK_VALIDITY_GOTO(c->pstream, s, tag, ret, finish);
 



View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/a5f25af0434bd703c502c230f5a5ff0238b6b8a3

-- 
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/a5f25af0434bd703c502c230f5a5ff0238b6b8a3
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20190118/4aaf5719/attachment.html>


More information about the pulseaudio-commits mailing list