summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2006-08-21 11:26:43 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2006-08-21 11:26:43 +0000
commit9b3d6f5cd180f037789e0b2af4656f55d6df2c0c (patch)
treed5daada5a46d66957772e76312549464271bf8c8
parent99b4c49f0afb4bb3bc92bded8ed8ab59e67a440a (diff)
Initialize memory to zero in hci_for_each_dev
-rw-r--r--src/hci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/hci.c b/src/hci.c
index caed69bf..dca4c096 100644
--- a/src/hci.c
+++ b/src/hci.c
@@ -680,6 +680,8 @@ int hci_for_each_dev(int flag, int (*func)(int dd, int dev_id, long arg), long a
goto done;
}
+ memset(dl, 0, HCI_MAX_DEV * sizeof(*dr) + sizeof(*dl));
+
dl->dev_num = HCI_MAX_DEV;
dr = dl->dev_req;