lkml.org 
[lkml]   [2019]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 03/11] ASoC: compress: Fix memory leak from snd_soc_new_compress
On Mon, Jun 17, 2019 at 01:36:36PM +0200, Amadeusz Sławiński wrote:
> Change kzalloc to devm_kzalloc, so compr gets automatically freed when
> it's no longer needed.
>
> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
> ---
> sound/soc/soc-compress.c | 17 ++++++-----------
> 1 file changed, 6 insertions(+), 11 deletions(-)

This will mean it'll get freed at some point if the driver for the
device it's allocated against gets removed but it will still get
allocated every time the card gets instntiated (eg, due to deferred
probe or due to some other driver getting probed and removed).
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-06-25 14:02    [W:0.138 / U:14.784 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site