]> Git Repo - linux.git/commitdiff
ACPI / APEI: ERST: Fixed leaked resources in erst_init
authorJosh Hunt <[email protected]>
Tue, 8 Mar 2016 15:52:12 +0000 (10:52 -0500)
committerRafael J. Wysocki <[email protected]>
Thu, 10 Mar 2016 23:14:16 +0000 (00:14 +0100)
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 <[email protected]>
Reviewed-by: Chen, Gong <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
drivers/acpi/apei/erst.c

index 6e6bc1059301745fc1d5fd6ebf943d048082e821..006c3894c6ea1a9b3fd344b28b49a88b851c5fc4 100644 (file)
@@ -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:
This page took 0.062261 seconds and 4 git commands to generate.