diff options
author | Gustavo F. Padovan <gustavo@las.ic.unicamp.br> | 2009-02-09 21:50:56 -0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-02-10 16:40:47 +0100 |
commit | 28faab63be1eb83bf26f394552f46bce1b1d4114 (patch) | |
tree | 607cf8157e643d9f45cce8365f831cc90673cc46 /tools/hcitool.c | |
parent | 60cf1091c23bb36f45f56ab94b1904e61498f3c7 (diff) |
Fix memory leaks in hciconfig and hcitool
Some printfs were using functions that return dynamic allocated memory
as parameters.
Diffstat (limited to 'tools/hcitool.c')
-rw-r--r-- | tools/hcitool.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/hcitool.c b/tools/hcitool.c index e24bde97..faf4cb4f 100644 --- a/tools/hcitool.c +++ b/tools/hcitool.c @@ -102,11 +102,13 @@ static int conn_list(int s, int dev_id, long arg) for (i = 0; i < cl->conn_num; i++, ci++) { char addr[18]; + char *str; ba2str(&ci->bdaddr, addr); + str = hci_lmtostr(ci->link_mode); printf("\t%s %s %s handle %d state %d lm %s\n", ci->out ? "<" : ">", type2str(ci->type), - addr, ci->handle, ci->state, - hci_lmtostr(ci->link_mode)); + addr, ci->handle, ci->state, str); + bt_free(str); } return 0; |