From 5934f133d44aeda4e682bd15daf2dc93bb7d355f Mon Sep 17 00:00:00 2001 From: Brian Gix Date: Mon, 13 Mar 2023 11:48:42 -0700 Subject: mesh: Fix uninitialized memory usage When attempting to cancel an unknown Scan request structure must be NULL initialized. --- mesh/manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.1