From: Josh Hunt Date: Tue, 8 Mar 2016 15:52:12 +0000 (-0500) Subject: ACPI / APEI: ERST: Fixed leaked resources in erst_init X-Git-Tag: v4.6-rc1~136^2~9^4 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=3a03d126ece4388d05937090a87bade560117751;p=linux-2.6-block.git ACPI / APEI: ERST: Fixed leaked resources in erst_init erst_init currently leaks resources allocated from its call to apei_resources_init(). The data allocated there gets copied into apei_resources_all and can be freed when we're done with it. Signed-off-by: Josh Hunt Reviewed-by: Chen, Gong Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c index 6e6bc1059301..006c3894c6ea 100644 --- a/drivers/acpi/apei/erst.c +++ b/drivers/acpi/apei/erst.c @@ -1207,6 +1207,9 @@ static int __init erst_init(void) "Failed to allocate %lld bytes for persistent store error log.\n", erst_erange.size); + /* Cleanup ERST Resources */ + apei_resources_fini(&erst_resources); + return 0; err_release_erange: