All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v2 1/2] mesh: Fix uninitialized memory usage
@ 2023-03-13 20:00 Brian Gix
  2023-03-13 20:00 ` [PATCH BlueZ v2 2/2] mesh: Loopback unprovisioned beacons Brian Gix
  2023-03-13 21:38 ` [BlueZ,v2,1/2] mesh: Fix uninitialized memory usage bluez.test.bot
  0 siblings, 2 replies; 3+ messages in thread
From: Brian Gix @ 2023-03-13 20:00 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: brian.gix, brian.gix, inga.stotland

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);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-13 21:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-13 20:00 [PATCH BlueZ v2 1/2] mesh: Fix uninitialized memory usage Brian Gix
2023-03-13 20:00 ` [PATCH BlueZ v2 2/2] mesh: Loopback unprovisioned beacons Brian Gix
2023-03-13 21:38 ` [BlueZ,v2,1/2] mesh: Fix uninitialized memory usage bluez.test.bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.