[alsa-devel] [PATCH] fix one memory leak in sound jack

Wu Fengguang fengguang.wu at intel.com
Mon Feb 21 06:56:45 CET 2011


Guanqun, it helps to point out the commit that first introduced the
problem.

Reviewed-by: Wu Fengguang <fengguang.wu at intel.com>

On Mon, Feb 21, 2011 at 01:45:04PM +0800, Lu Guanqun wrote:
> Signed-off-by: Lu Guanqun <guanqun.lu at intel.com>
> ---
>  sound/core/jack.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/sound/core/jack.c b/sound/core/jack.c
> index 4902ae5..53b53e9 100644
> --- a/sound/core/jack.c
> +++ b/sound/core/jack.c
> @@ -141,6 +141,7 @@ int snd_jack_new(struct snd_card *card, const char *id, int type,
>  
>  fail_input:
>  	input_free_device(jack->input_dev);
> +	kfree(jack->id);
>  	kfree(jack);
>  	return err;
>  }
> -- 
> 1.7.2.3


More information about the Alsa-devel mailing list