diff mbox series

obexd: Fix obex pointer is not null judgment

Message ID 20220628060107.26070-1-wangyouwan@uniontech.com (mailing list archive)
State Superseded
Headers show
Series obexd: Fix obex pointer is not null judgment | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch warning obexd: Fix obex pointer is not null judgment WARNING:LEADING_SPACE: please, no spaces at the start of a line #69: FILE: gobex/gobex-transfer.c:67: + if (transfer->obex)$ WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (4, 16) #69: FILE: gobex/gobex-transfer.c:67: + if (transfer->obex) + g_obex_unref(transfer->obex); /github/workspace/src/12897744.patch total: 0 errors, 2 warnings, 9 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. /github/workspace/src/12897744.patch has style problems, please review. NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.
tedd_an/gitlint success Gitlint PASS
tedd_an/setupell success Setup ELL PASS
tedd_an/buildprep success Build Prep PASS
tedd_an/build success Build Configuration PASS
tedd_an/makecheck success Make Check PASS
tedd_an/makecheckvalgrind success Make Check PASS
tedd_an/makedistcheck success Make Distcheck PASS
tedd_an/build_extell success Build External ELL PASS
tedd_an/build_extell_make success Build Make with External ELL PASS

Commit Message

Youwan Wang June 28, 2022, 6:01 a.m. UTC
Judge that the obex pointer is not null
before OBEX release
---
 gobex/gobex-transfer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com June 28, 2022, 7:29 a.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=654450

---Test result---

Test Summary:
CheckPatch                    FAIL      1.22 seconds
GitLint                       PASS      0.79 seconds
Prep - Setup ELL              PASS      42.64 seconds
Build - Prep                  PASS      0.59 seconds
Build - Configure             PASS      8.28 seconds
Build - Make                  PASS      1277.12 seconds
Make Check                    PASS      11.49 seconds
Make Check w/Valgrind         PASS      451.73 seconds
Make Distcheck                PASS      239.01 seconds
Build w/ext ELL - Configure   PASS      8.58 seconds
Build w/ext ELL - Make        PASS      1257.30 seconds
Incremental Build with patchesPASS      0.00 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script with rule in .checkpatch.conf
Output:
obexd: Fix obex pointer is not null judgment
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#69: FILE: gobex/gobex-transfer.c:67:
+    if (transfer->obex)$

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (4, 16)
#69: FILE: gobex/gobex-transfer.c:67:
+    if (transfer->obex)
+		g_obex_unref(transfer->obex);

/github/workspace/src/12897744.patch total: 0 errors, 2 warnings, 9 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/12897744.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.




---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/gobex/gobex-transfer.c b/gobex/gobex-transfer.c
index c94d018b2..626a08e38 100644
--- a/gobex/gobex-transfer.c
+++ b/gobex/gobex-transfer.c
@@ -64,7 +64,8 @@  static void transfer_free(struct transfer *transfer)
 		g_obex_remove_request_function(transfer->obex,
 							transfer->abort_id);
 
-	g_obex_unref(transfer->obex);
+    if (transfer->obex)
+		g_obex_unref(transfer->obex);
 	g_free(transfer);
 }