[pulseaudio-discuss] [PATCH v3] bluez5-device: Fix memory leak in sco_process_render()

Tanu Kaskinen tanuk at iki.fi
Mon May 7 14:28:25 UTC 2018

On Thu, 2018-04-26 at 13:24 +0200, Georg Chini wrote:
> sco_process_render does not unref the memblock when it encounters an error.
> This patch fixes the issue. It also changes the return value to 1 in the case
> of EAGAIN. Because the data was already rendered and cannot be re-sent, we
> have to discard the block.
> Because the modified EAGAIN handling prevents the log message about EAGAIN
> after POLLOUT from being printed, the log message was moved to
> a2dp/sco_process_render().
> ---
> Changes in v2: Save errno before calling pa_memblock_unref()
> Changes in v3: Move log message to a2dp/sco_process_render()
>  src/modules/bluetooth/module-bluez5-device.c | 28 +++++++++++++++++++---------
>  1 file changed, 19 insertions(+), 9 deletions(-)

Looks good to me.



More information about the pulseaudio-discuss mailing list