summaryrefslogtreecommitdiff
path: root/monitor
diff options
context:
space:
mode:
authorSyam Sidhardhan <s.syam@samsung.com>2012-05-23 21:27:21 +0530
committerJohan Hedberg <johan.hedberg@intel.com>2012-05-24 11:03:10 +0300
commitb0abb13fafa89f4d00f0c2d37d1babc1d873d6ca (patch)
treef2c1825aba948131203c760960d662af0361a7f9 /monitor
parentcbd2b1348ba88667b5b02cb197170a21ba4d4ae9 (diff)
downloadbluez-b0abb13fafa89f4d00f0c2d37d1babc1d873d6ca.tar.gz
monitor: Fix memory leak
Diffstat (limited to 'monitor')
-rw-r--r--monitor/hcidump.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/monitor/hcidump.c b/monitor/hcidump.c
index 043c75e0f..373d2f55f 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);
}