[pulseaudio-discuss] [PATCH] alsa-card: Don't free the modargs in pa__init
Tanu Kaskinen
tanu.kaskinen at linux.intel.com
Fri Jan 10 02:38:09 PST 2014
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
More information about the pulseaudio-discuss
mailing list