summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2006-08-21 10:32:10 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2006-08-21 10:32:10 +0000
commit99b4c49f0afb4bb3bc92bded8ed8ab59e67a440a (patch)
tree1eaa2b8409b452cc77d987d0f070291eee7cca69 /src
parentd57d189c75ba7ee813d943d228f6311fca00c5ce (diff)
Initialize hci_dev_info memory to zero before calling ioctl
Diffstat (limited to 'src')
-rw-r--r--src/hci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/hci.c b/src/hci.c
index 7135501b..caed69bf 100644
--- a/src/hci.c
+++ b/src/hci.c
@@ -764,6 +764,8 @@ int hci_devinfo(int dev_id, struct hci_dev_info *di)
if (dd < 0)
return dd;
+ memset(di, 0, sizeof(struct hci_dev_info));
+
di->dev_id = dev_id;
ret = ioctl(dd, HCIGETDEVINFO, (void *) di);