[PATCH] alsa-card: Don't free the modargs in pa__init

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

 



On Fri, 2014-01-03 at 23:21 +0100, Peter Meerwald wrote:
> The modargs are in both cases (a succesfull as well as a failed module
> initialization) freed already in pa__done().
> 
> To avoid leaking modargs memory before they are assigned to u->modargs, the
> code is reorganized to first allocate userdata, and then allocate the modargs.
> Local variable ma is not needed anymore.
> 
> discussion here
> http://lists.freedesktop.org/archives/pulseaudio-discuss/2013-December/019661.html
> 
> Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
> Reported-by: poljar (Damir Jeli?) <poljarinho at gmail.com>
> ---
>  src/modules/alsa/module-alsa-card.c | 45 ++++++++++++++++---------------------
>  1 file changed, 19 insertions(+), 26 deletions(-)
> 
> diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
> index 1a823d7..cf54c0f 100644
> --- a/src/modules/alsa/module-alsa-card.c
> +++ b/src/modules/alsa/module-alsa-card.c
> @@ -607,7 +607,6 @@ static pa_hook_result_t source_output_unlink_hook_callback(pa_core *c, pa_source

Thanks, applied.

-- 
Tanu



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

  Powered by Linux