Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1353175

[PATCH v2 2/2] ACPI, APEI, ERST: Fixed leaked resources in erst_init

From Joshua Hunt <johunt@akamai.com>
Newsgroups linux.kernel
Subject [PATCH v2 2/2] ACPI, APEI, ERST: Fixed leaked resources in erst_init
Date 2016-03-08 17:10 +0100
Message-ID <rasmR-37R-3@gated-at.bofh.it> (permalink)
References <rasdc-2OP-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <johunt@akamai.com>
---
 drivers/acpi/apei/erst.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
index 6e6bc10..006c389 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:
-- 
1.7.9.5

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/2] ACPI, APEI: Memory leaks Joshua Hunt <johunt@akamai.com> - 2016-03-08 17:00 +0100
  [PATCH v2 1/2] ACPI, APEI: Fix leaked resources Joshua Hunt <johunt@akamai.com> - 2016-03-08 17:00 +0100
    Re: [PATCH v2 1/2] ACPI, APEI: Fix leaked resources "Chen, Gong" <gong.chen@linux.intel.com> - 2016-03-09 02:20 +0100
  [PATCH v2 2/2] ACPI, APEI, ERST: Fixed leaked resources in erst_init Joshua Hunt <johunt@akamai.com> - 2016-03-08 17:10 +0100
    Re: [PATCH v2 2/2] ACPI, APEI, ERST: Fixed leaked resources in  erst_init "Chen, Gong" <gong.chen@linux.intel.com> - 2016-03-09 02:20 +0100
  RE: [PATCH v2 0/2] ACPI, APEI: Memory leaks "Luck, Tony" <tony.luck@intel.com> - 2016-03-11 00:00 +0100
    Re: [PATCH v2 0/2] ACPI, APEI: Memory leaks "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-11 00:20 +0100
  Re: [PATCH v2 0/2] ACPI, APEI: Memory leaks "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-11 00:00 +0100

csiph-web