diff mbox series

[BlueZ,1/2] mesh: Fix uninitialized memory usage

Message ID 20230313190808.48102-1-brian.gix@gmail.com (mailing list archive)
State Superseded
Headers show
Series [BlueZ,1/2] mesh: Fix uninitialized memory usage | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Brian Gix March 13, 2023, 7:08 p.m. UTC
When attempting to cancel an unknown Scan request structure must be
NULL initialized.
---
 mesh/manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com March 13, 2023, 8:40 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=729587

---Test result---

Test Summary:
CheckPatch                    PASS      0.77 seconds
GitLint                       PASS      0.51 seconds
BuildEll                      PASS      26.19 seconds
BluezMake                     PASS      755.85 seconds
MakeCheck                     PASS      10.79 seconds
MakeDistcheck                 PASS      147.44 seconds
CheckValgrind                 PASS      239.95 seconds
CheckSmatch                   PASS      320.15 seconds
bluezmakeextell               PASS      97.47 seconds
IncrementalBuild              PASS      1211.06 seconds
ScanBuild                     PASS      958.65 seconds



---
Regards,
Linux Bluetooth
diff mbox series

Patch

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