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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
Tanu

https://liberapay.com/tanuk
https://www.patreon.com/tanuk


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux