Re: [PATCH] acer-wmi: fix memory leaks in wmab_execute error path

From: Carlos Corbacho
Date: Fri Jul 09 2010 - 16:54:15 EST


On Friday 09 July 2010 04:51:15 Axel Lin wrote:
> When acpi_evaluate_object() is passed ACPI_ALLOCATE_BUFFER,
> the caller must kfree the returned buffer if AE_OK is returned.
>
> Call Trace:
> wmab_execute
> -> wmi_evaluate_method
> -> acpi_evaluate_object
>
> Thus if callers of wmab_execute() pass ACPI_ALLOCATE_BUFFER,
> the return buffer must be kfreed if wmab_execute return AE_OK.
>
> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>

Acked-by: Carlos Corbacho <carlos@xxxxxxxxxxxxxxxxxxx>
--
E-Mail: carlos@xxxxxxxxxxxxxxxxxxx
Web: strangeworlds.co.uk
GPG Key ID: 0x23EE722D
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/