From 9b3d6f5cd180f037789e0b2af4656f55d6df2c0c Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 21 Aug 2006 11:26:43 +0000 Subject: Initialize memory to zero in hci_for_each_dev --- src/hci.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- cgit