Free memory pointed by cr variable after it is used. --- tools/hcitool.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/hcitool.c b/tools/hcitool.c index 8a92067..c2df8e3 100644 --- a/tools/hcitool.c +++ b/tools/hcitool.c @@ -961,6 +961,7 @@ static void cmd_info(int dev_id, int argc, char **argv) htobs(di.pkt_type & ACL_PTYPE_MASK), 0, 0x01, &handle, 25000) < 0) { perror("Can't create connection"); + free(cr); close(dd); exit(1); } @@ -969,6 +970,8 @@ static void cmd_info(int dev_id, int argc, char **argv) } else handle = htobs(cr->conn_info->handle); + free(cr); + printf("\tBD Address: %s\n", argv[0]); comp = batocomp(&bdaddr); -- 1.8.5.3 -- 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