diff mbox series

[BlueZ,v4,2/2] src/shared/micp.c :MICP-MICS implementation memory leak fix

Message ID 20231005121544.306495-3-mahesh.talewad@nxp.com (mailing list archive)
State Accepted
Commit 0a749634f5972e741137844d0e2174d8ba1444c5
Headers show
Series MICP-MICS implementation's memory fix and Unit Test case's fix | 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

Mahesh Talewad Oct. 5, 2023, 12:15 p.m. UTC
- Fixed memory leak issue
---
 src/shared/micp.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

bluez.test.bot@gmail.com Oct. 5, 2023, 5:48 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=790316

---Test result---

Test Summary:
CheckPatch                    PASS      0.66 seconds
GitLint                       PASS      0.29 seconds
BuildEll                      PASS      41.42 seconds
BluezMake                     PASS      1330.05 seconds
MakeCheck                     PASS      14.39 seconds
MakeDistcheck                 PASS      237.20 seconds
CheckValgrind                 PASS      361.75 seconds
CheckSmatch                   PASS      507.23 seconds
bluezmakeextell               PASS      156.71 seconds
IncrementalBuild              PASS      1149.09 seconds
ScanBuild                     PASS      1605.37 seconds



---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/src/shared/micp.c b/src/shared/micp.c
index 90d05b301..b82bd92de 100644
--- a/src/shared/micp.c
+++ b/src/shared/micp.c
@@ -138,6 +138,7 @@  void bt_micp_detach(struct bt_micp *micp)
 	if (!queue_remove(sessions, micp))
 		return;
 
+	bt_gatt_client_idle_unregister(micp->client, micp->idle_id);
 	bt_gatt_client_unref(micp->client);
 	micp->client = NULL;
 
@@ -175,6 +176,7 @@  static void micp_free(void *data)
 
 	micp_db_free(micp->rdb);
 
+	queue_destroy(micp->notify, free);
 	queue_destroy(micp->pending, NULL);
 	queue_destroy(micp->ready_cbs, micp_ready_free);
 
@@ -594,6 +596,7 @@  struct bt_micp *bt_micp_new(struct gatt_db *ldb, struct gatt_db *rdb)
 	micp->ldb = mdb;
 	micp->pending = queue_new();
 	micp->ready_cbs = queue_new();
+	micp->notify = queue_new();
 
 	if (!rdb)
 		goto done;