Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145952344
D9878.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
952 B
Referenced Files
None
Subscribers
None
D9878.diff
View Options
Index: head/usr.sbin/bluetooth/hccontrol/hccontrol.c
===================================================================
--- head/usr.sbin/bluetooth/hccontrol/hccontrol.c
+++ head/usr.sbin/bluetooth/hccontrol/hccontrol.c
@@ -103,13 +103,14 @@
int s, mib[4], num;
size_t size;
struct nodeinfo *nodes;
+ char *lnode = NULL;
num = find_hci_nodes(&nodes);
if (num == 0)
errx(7, "Could not find HCI nodes");
if (node == NULL) {
- node = strdup(nodes[0].name);
+ node = lnode = strdup(nodes[0].name);
if (num > 1)
fprintf(stdout, "Using HCI node: %s\n", node);
}
@@ -130,6 +131,7 @@
if (connect(s, (struct sockaddr *) &addr, sizeof(addr)) < 0)
err(3, "Could not connect socket, node=%s", node);
+ free(lnode);
memset(&filter, 0, sizeof(filter));
bit_set(filter.event_mask, NG_HCI_EVENT_COMMAND_COMPL - 1);
bit_set(filter.event_mask, NG_HCI_EVENT_COMMAND_STATUS - 1);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Feb 27, 11:48 AM (4 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29028548
Default Alt Text
D9878.diff (952 B)
Attached To
Mode
D9878: Fix a memory leak in bluetooth/hccontrol
Attached
Detach File
Event Timeline
Log In to Comment