Skip to contentSkip to conversation

obexd: fix small probability problem

PATCH In review Youwan Wang 2 participants 2 messages Jul 7, 2022 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 obexd: fix small probability problem

Need to consider the case where err is not released

---
 gobex/gobex.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
gobex/gobex.c +5 -1
index e9b89cead..bc4d52551 100644
@@ -1140,8 +1140,12 @@ static void handle_response(GObex *obex, GError *err, GObexPacket *rsp)
 		p->rsp_func(obex, err, rsp, p->rsp_data);
 
 		/* Check if user callback removed the request */
-		if (!final_rsp && p != obex->pending_req)
+		if (!final_rsp && p != obex->pending_req) {
+			if (p->cancelled)
+				g_error_free(err);
+
 			return;
+		}
 	}
 
 	if (p->cancelled)
Signature · 1 line
2.20.1
#1 lore raw

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

---Test result---

Test Summary:

CheckPatch                    PASS      1.35 seconds
GitLint                       PASS      0.94 seconds
Prep - Setup ELL              PASS      26.77 seconds
Build - Prep                  PASS      0.80 seconds
Build - Configure             PASS      8.51 seconds
Build - Make                  PASS      932.41 seconds
Make Check                    PASS      11.63 seconds
Make Check w/Valgrind         PASS      283.30 seconds
Make Distcheck                PASS      230.61 seconds
Build w/ext ELL - Configure   PASS      8.65 seconds
Build w/ext ELL - Make        PASS      81.16 seconds
Incremental Build w/ patches  PASS      0.00 seconds
Scan Build                    PASS      491.14 seconds

---
Regards,
Linux Bluetooth