All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v3 1/2] mesh: Fix uninitialized memory usage
@ 2023-03-13 23:11 Brian Gix
  2023-03-13 23:11 ` [PATCH BlueZ v3 2/2] mesh: Loopback unprovisioned beacons Brian Gix
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Brian Gix @ 2023-03-13 23:11 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] 4+ messages in thread

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-13 23:11 [PATCH BlueZ v3 1/2] mesh: Fix uninitialized memory usage Brian Gix
2023-03-13 23:11 ` [PATCH BlueZ v3 2/2] mesh: Loopback unprovisioned beacons Brian Gix
2023-03-14  0:19 ` [BlueZ,v3,1/2] mesh: Fix uninitialized memory usage bluez.test.bot
2023-03-14 21:40 ` [PATCH BlueZ v3 1/2] " patchwork-bot+bluetooth

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.