[PATCH BlueZ 01/12] monitor: Fix memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 monitor/hcidump.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/monitor/hcidump.c b/monitor/hcidump.c
index 043c75e..373d2f5 100644
--- a/monitor/hcidump.c
+++ b/monitor/hcidump.c
@@ -233,7 +233,7 @@ static void device_list(int fd, int max_dev)
 
 	if (ioctl(fd, HCIGETDEVLIST, (void *) dl) < 0) {
 		perror("Failed to get device list");
-		return;
+		goto done;
 	}
 
 	for (i = 0; i < dl->dev_num; i++, dr++) {
@@ -253,6 +253,7 @@ static void device_list(int fd, int max_dev)
 		open_device(dr->dev_id);
 	}
 
+done:
 	free(dl);
 }
 
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux