diff mbox series

obexd: fix small probability problem

Message ID 20220707124348.25184-1-wangyouwan@uniontech.com
State New
Headers show
Series obexd: fix small probability problem | expand

Commit Message

Youwan Wang July 7, 2022, 12:43 p.m. UTC
Need to consider the case where err is not released
---
 gobex/gobex.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com July 7, 2022, 1:28 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=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
diff mbox series

Patch

diff --git a/gobex/gobex.c b/gobex/gobex.c
index e9b89cead..bc4d52551 100644
--- a/gobex/gobex.c
+++ b/gobex/gobex.c
@@ -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)