Message ID | 20220218194617.160812-1-hj.tedd.an@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 8fe1e5e165ad7b4f7c318f507aa85cd747401b81 |
Headers | show |
Series | [BlueZ] gobex: Fix read from pointer after free | expand |
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=615864 ---Test result--- Test Summary: CheckPatch FAIL 1.51 seconds GitLint PASS 1.03 seconds Prep - Setup ELL PASS 39.27 seconds Build - Prep PASS 0.71 seconds Build - Configure PASS 8.01 seconds Build - Make PASS 1327.50 seconds Make Check PASS 11.31 seconds Make Check w/Valgrind PASS 405.40 seconds Make Distcheck PASS 213.79 seconds Build w/ext ELL - Configure PASS 8.08 seconds Build w/ext ELL - Make PASS 1305.72 seconds Incremental Build with patchesPASS 0.00 seconds Details ############################## Test: CheckPatch - FAIL Desc: Run checkpatch.pl script with rule in .checkpatch.conf Output: [BlueZ] gobex: Fix read from pointer after free WARNING:UNKNOWN_COMMIT_ID: Unknown commit id '7e7d826aa1db', maybe rebased or not pulled? #84: Fixes: 7e7d826aa1db ("gobex: Print error if data cannot be written") /github/workspace/src/12751809.patch total: 0 errors, 1 warnings, 8 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/12751809.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 --git a/gobex/gobex.c b/gobex/gobex.c index 185eed4d7..e9b89cead 100644 --- a/gobex/gobex.c +++ b/gobex/gobex.c @@ -471,6 +471,8 @@ encode: check_srm_final(obex, obex->tx_buf[0] & ~FINAL_BIT); pending_pkt_free(p); + /* g_free() doesn't set the pointer to NULL */ + p = NULL; } obex->tx_data = len;
From: Tedd Ho-Jeong An <tedd.an@intel.com> This patch sets the pointer to null after free since the g_free(p) doesn't set the pointer to NULL. This is reported by the Coverity. Fixes: 7e7d826aa1db ("gobex: Print error if data cannot be written") --- gobex/gobex.c | 2 ++ 1 file changed, 2 insertions(+)