Diff between 95f254e69972acaf4be4688aa8affcfa9b2cee19 and f47fd9c820152cb37209d391ab874a8eaadbdc76

Changed Files

File Additions Deletions Status
tools/hciconfig.c +3 -0 modified

Full Patch

diff --git a/tools/hciconfig.c b/tools/hciconfig.c
index 6397e71..0e0b790 100644
--- a/tools/hciconfig.c
+++ b/tools/hciconfig.c
@@ -69,6 +69,7 @@ static void print_dev_list(int ctl, int flags)
 
 	if (ioctl(ctl, HCIGETDEVLIST, (void *) dl) < 0) {
 		perror("Can't get device list");
+		free(dl);
 		exit(1);
 	}
 
@@ -78,6 +79,8 @@ static void print_dev_list(int ctl, int flags)
 			continue;
 		print_dev_info(ctl, &di);
 	}
+
+	free(dl);
 }
 
 static void print_pkt_type(struct hci_dev_info *di)