summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Gix <brian.gix@gmail.com>2023-03-13 11:48:42 -0700
committerBrian Gix <brian.gix@gmail.com>2023-03-14 14:34:36 -0700
commit5934f133d44aeda4e682bd15daf2dc93bb7d355f (patch)
tree7ce396d0251c901d7a03ca0ede76992d6396d188
parent857d9b96b38401ce5666172ddea115d37ad6af70 (diff)
downloadbluez-5934f133d44aeda4e682bd15daf2dc93bb7d355f.tar.gz
mesh: Fix uninitialized memory usage
When attempting to cancel an unknown Scan request structure must be NULL initialized.
-rw-r--r--mesh/manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesh/manager.c b/mesh/manager.c
index e16dbc513..0c98721bf 100644
--- a/mesh/manager.c
+++ b/mesh/manager.c
@@ -709,7 +709,7 @@ static struct l_dbus_message *start_scan_call(struct l_dbus *dbus,
req = l_queue_remove_if(scans, by_node_svr, &new_req);
if (!req)
- req = l_malloc(sizeof(new_req));
+ req = l_new(struct scan_req, 1);
if (req->timeout) {
l_timeout_remove(req->timeout);