On Thursday 26 August 2010 08:14:58 Dmitry Torokhov wrote:
> If we _WDG returned object that is not buffer we were forgetting
> to free memory allocated for that object.
> 
> Signed-off-by: Dmitry Torokhov <[email protected]>

Acked-by: Carlos Corbacho <[email protected]>

> ---
> 
>  drivers/platform/x86/wmi.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
> index 63ad45e..5abb2ad 100644
> --- a/drivers/platform/x86/wmi.c
> +++ b/drivers/platform/x86/wmi.c
> @@ -837,8 +837,10 @@ static acpi_status parse_wdg(acpi_handle handle)
> 
>       obj = (union acpi_object *) out.pointer;
> 
> -     if (obj->type != ACPI_TYPE_BUFFER)
> -             return AE_ERROR;
> +     if (obj->type != ACPI_TYPE_BUFFER) {
> +             status = AE_ERROR;
> +             goto out_free_pointer;
> +     }
> 
>       total = obj->buffer.length / sizeof(struct guid_block);

-- 
E-Mail: [email protected]
Web: strangeworlds.co.uk
GPG Key ID: 0x23EE722D
--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" 
in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to