linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] Bluetooth: hci_bcm: Add missing acpi_dev_free_resource_list()
@ 2015-09-30 13:26 Jarkko Nikula
       [not found] ` <1443619605-19320-1-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Jarkko Nikula @ 2015-09-30 13:26 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: linux-acpi, Marcel Holtmann, Gustavo Padovan, Johan Hedberg,
	Frederic Danis, Jarkko Nikula

Caller of acpi_dev_get_resources() should free the constructed resource
list by calling the acpi_dev_free_resource_list() in order to avoid memory
leak.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
Call to acpi_dev_get_resources() was introduced by the commit ae056908862b
("Bluetooth: hci_bcm: Retrieve UART speed from ACPI") so fix should go to
v4.3-rc.
---
 drivers/bluetooth/hci_bcm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index 0c791ac279d0..1a538ad6bf2b 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -706,6 +706,7 @@ static int bcm_acpi_probe(struct bcm_device *dev)
 		return 0;
 
 	acpi_dev_get_resources(adev, &resources, bcm_resource, dev);
+	acpi_dev_free_resource_list(&resources);
 
 	dmi_id = dmi_first_match(bcm_wrong_irq_dmi_table);
 	if (dmi_id) {
-- 
2.5.3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-10-01  8:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-30 13:26 [PATCH 1/5] Bluetooth: hci_bcm: Add missing acpi_dev_free_resource_list() Jarkko Nikula
     [not found] ` <1443619605-19320-1-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-09-30 13:26   ` [PATCH 2/5] Bluetooth: hci_bcm: Handle possible error from acpi_dev_get_resources() Jarkko Nikula
2015-09-30 13:26   ` [PATCH 3/5] Bluetooth: hci_bcm: Remove needless acpi_match_device() call Jarkko Nikula
2015-09-30 13:26   ` [PATCH 4/5] Bluetooth: hci_bcm: Remove needless looking code Jarkko Nikula
2015-09-30 13:26   ` [PATCH 5/5] Bluetooth: hci_bcm: Do not test ACPI companion in bcm_acpi_probe() Jarkko Nikula
2015-10-01  7:13   ` [PATCH 1/5] Bluetooth: hci_bcm: Add missing acpi_dev_free_resource_list() Marcel Holtmann
2015-10-01  8:05     ` Marcel Holtmann
     [not found]       ` <B5ED0060-B534-493D-B6CD-16E44D255B2C-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
2015-10-01  8:39         ` Jarkko Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).