2022-06-21 04:37:36

by Chengyi Zhao

[permalink] [raw]
Subject: [PATCH BlueZ 1/1] avdtp: Free discover when send_request returns error

From: Chengyi <[email protected]>

When send_request returns an error, session->discover should
be released here, so that the next time the program enters
avdtp_discover, the -EBUSY error will not be returned.
---
profiles/audio/avdtp.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/profiles/audio/avdtp.c b/profiles/audio/avdtp.c
index bc7afad81..0d2213ea2 100644
--- a/profiles/audio/avdtp.c
+++ b/profiles/audio/avdtp.c
@@ -3429,6 +3429,9 @@ int avdtp_discover(struct avdtp *session, avdtp_discover_cb_t cb,
if (err == 0) {
session->discover->cb = cb;
session->discover->user_data = user_data;
+ } else if (session->discover) {
+ g_free(session->discover);
+ session->discover = NULL;
}

return err;
--
2.20.1




2022-06-21 06:03:20

by bluez.test.bot

[permalink] [raw]
Subject: RE: avdtp: Free discover when send_request returns error

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=652185

---Test result---

Test Summary:
CheckPatch PASS 1.03 seconds
GitLint PASS 0.70 seconds
Prep - Setup ELL PASS 49.02 seconds
Build - Prep PASS 0.69 seconds
Build - Configure PASS 9.57 seconds
Build - Make PASS 1701.01 seconds
Make Check PASS 11.90 seconds
Make Check w/Valgrind PASS 510.19 seconds
Make Distcheck PASS 271.21 seconds
Build w/ext ELL - Configure PASS 9.61 seconds
Build w/ext ELL - Make PASS 1674.08 seconds
Incremental Build with patchesPASS 0.00 seconds



---
Regards,
Linux Bluetooth