diff mbox series

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

Message ID 20230313200048.50855-1-brian.gix@gmail.com (mailing list archive)
State Superseded
Headers show
Series [BlueZ,v2,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, 8 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, 9:38 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=729593

---Test result---

Test Summary:
CheckPatch                    PASS      0.79 seconds
GitLint                       PASS      0.49 seconds
BuildEll                      PASS      31.84 seconds
BluezMake                     PASS      1012.63 seconds
MakeCheck                     PASS      13.01 seconds
MakeDistcheck                 PASS      180.85 seconds
CheckValgrind                 PASS      298.04 seconds
CheckSmatch                   PASS      393.38 seconds
bluezmakeextell               PASS      118.65 seconds
IncrementalBuild              PASS      1648.88 seconds
ScanBuild                     PASS      1223.47 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);