"sdptool add wiimote" has memory leak.
Valgrind log:
==6965== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 13 from 1)
==6965== malloc/free: in use at exit: 2,304 bytes in 100 blocks.
==6965== malloc/free: 120 allocs, 20 frees, 71,083 bytes allocated.
==6965== For counts of detected errors, rerun with: -v
==6965== searching for pointers to 100 not-freed blocks.
==6965== checked 68,476 bytes.
==6965==
==6965== 184 (40 direct, 144 indirect) bytes in 5 blocks are definitely lost in loss record 2 of 7
==6965== at 0x4022AB8: malloc (vg_replace_malloc.c:207)
==6965== by 0x4041482: sdp_list_append (in /usr/lib/libbluetooth.so.2.9.6)
==6965== by 0x804B88A: add_hid_wiimote (sdptool.c:2305)
==6965== by 0x804B54F: cmd_add (sdptool.c:3356)
==6965== by 0x80522DE: main (sdptool.c:4052)
==6965==
==6965==
==6965== 2,120 (16 direct, 2,104 indirect) bytes in 2 blocks are definitely lost in loss record 5 of 7
==6965== at 0x4022AB8: malloc (vg_replace_malloc.c:207)
==6965== by 0x404127F: sdp_list_insert_sorted (in /usr/lib/libbluetooth.so.2.9.6)
==6965== by 0x40448C4: sdp_pattern_add_uuid (in /usr/lib/libbluetooth.so.2.9.6)
==6965== by 0x404490E: sdp_pattern_add_uuidseq (in /usr/lib/libbluetooth.so.2.9.6)
==6965== by 0x4044A4E: sdp_set_uuidseq_attr (in /usr/lib/libbluetooth.so.2.9.6)
==6965== by 0x804B8A1: add_hid_wiimote (sdp_lib.h:227)
==6965== by 0x804B54F: cmd_add (sdptool.c:3356)
==6965== by 0x80522DE: main (sdptool.c:4052)
==6965==
==6965== LEAK SUMMARY:
==6965== definitely lost: 56 bytes in 7 blocks.
==6965== indirectly lost: 2,248 bytes in 93 blocks.
==6965== possibly lost: 0 bytes in 0 blocks.
==6965== still reachable: 0 bytes in 0 blocks.
==6965== suppressed: 0 bytes in 0 blocks.