[lm-sensors] [PATCH] hwmon: (asus_atk0110) fix memory leak

Jean Delvare khali at linux-fr.org
Wed Jul 6 09:30:48 CEST 2011


On Tue, 5 Jul 2011 21:56:46 +0200, Luca Tettamanti wrote:
> The object returned by atk_gitm is dynamically allocated and must be
> freed.
> 
> Signed-off-by: Luca Tettamanti <kronos.it at gmail.com>
> 
> ---
>  drivers/hwmon/asus_atk0110.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c
> index dcb78a7..00e9851 100644
> --- a/drivers/hwmon/asus_atk0110.c
> +++ b/drivers/hwmon/asus_atk0110.c
> @@ -674,6 +674,7 @@ static int atk_debugfs_gitm_get(void *p, u64 *val)
>  	else
>  		err = -EIO;
>  
> +	ACPI_FREE(ret);
>  	return err;
>  }
>  

Good catch. Applied, thanks!

-- 
Jean Delvare




More information about the lm-sensors mailing list